Class AUIDGenerator

  extended by
      extended by
          extended by
All Implemented Interfaces:

public class AUIDGenerator
extends AbstractUIDGenerator

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 ValueGenerator.

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.

Field Summary
Fields inherited from class
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
Constructor Summary
AUIDGenerator(java.lang.String name, java.util.Properties props)
Method Summary
protected  java.lang.String getIdentifier()
          Accessor for a new identifier.
Methods inherited from class
getStorageClass, reserveBlock
Methods inherited from class
allocate, createRepository, current, currentValue, getName, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


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

Method Detail


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

Specified by:
getIdentifier in class AbstractUIDGenerator
The identifier

Copyright © 2010. All Rights Reserved.