org.jpox.store.poid
Class AUIDPoidGenerator

java.lang.Object
  extended byorg.jpox.store.poid.AbstractPoidGenerator
      extended byorg.jpox.store.poid.AbstractUIDPoidGenerator
          extended byorg.jpox.store.poid.AUIDPoidGenerator
All Implemented Interfaces:
PoidGenerator, javax.jdo.datastore.Sequence

public class AUIDPoidGenerator
extends AbstractUIDPoidGenerator

This generator uses a Java implementation of DCE UUIDs to create unique identifiers without the overhead of additional database transactions or even an open database connection. The identifiers are Strings of the form "LLLLLLLL-MMMM-HHHH-CCCC-NNNNNNNNNNNN" where 'L', 'M', 'H', 'C' and 'N' are the DCE UUID fields named time low, time mid, time high, clock sequence and node. This generator can be used in concurrent applications. It is especially useful in situations where large numbers of transactions within a certain amount of time have to be made, and the additional overhead of synchronizing the concurrent creation of unique identifiers through the database would break performance limits. There are no properties for this PoidGenerator. Note: Due to limitations of the available Java API there is a chance of less than 1:2^62 that two concurrently running JVMs will produce the same identifiers, which is in practical terms never, because your database server will have crashed a million times before this happens.

Version:
$Revision: 1.3 $

Field Summary
 
Fields inherited from class org.jpox.store.poid.AbstractPoidGenerator
defaultBlockSize, LOCALISER, name, poidBlock, properties
 
Constructor Summary
AUIDPoidGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected  java.lang.String getIdentifier()
          Accessor for a new identifier.
 
Methods inherited from class org.jpox.store.poid.AbstractUIDPoidGenerator
reserveBlock
 
Methods inherited from class org.jpox.store.poid.AbstractPoidGenerator
allocate, createRepository, current, currentValue, getName, next, nextValue, obtainPoidBlock, obtainPoidBlock, requiresRepository, reserveBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AUIDPoidGenerator

public AUIDPoidGenerator(java.lang.String name,
                         java.util.Properties props)
Constructor.

Method Detail

getIdentifier

protected java.lang.String getIdentifier()
Accessor for a new identifier.

Specified by:
getIdentifier in class AbstractUIDPoidGenerator
Returns:
The identifier


Copyright © -2007 . All Rights Reserved.