org.datanucleus.store.valuegenerator
Class UUIDHexGenerator

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.AbstractGenerator
      extended by org.datanucleus.store.valuegenerator.AbstractUIDGenerator
          extended by org.datanucleus.store.valuegenerator.AbstractUUIDGenerator
              extended by org.datanucleus.store.valuegenerator.UUIDHexGenerator
All Implemented Interfaces:
ValueGenerator

public class UUIDHexGenerator
extends AbstractUUIDGenerator

Value generator for a UUID hexadecimal format. Results in Strings of length 32 characters, containing the IP address of the local machine as per the JDO2 spec section 18.6.1.


Field Summary
 
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractUUIDGenerator
counter, IP_ADDRESS, JVM_UNIQUE
 
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
 
Constructor Summary
UUIDHexGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected  java.lang.String getIdentifier()
          Create an identifier with the form "IIIIIIIIJJJJJJJJHHHHLLLLLLLLCCCC".
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractUUIDGenerator
getCount
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractUIDGenerator
getStorageClass, reserveBlock
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
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

UUIDHexGenerator

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

Parameters:
name - Symbolic name for this generator
props - Properties controlling its behaviour
Method Detail

getIdentifier

protected java.lang.String getIdentifier()
Create an identifier with the form "IIIIIIIIJJJJJJJJHHHHLLLLLLLLCCCC". Where IIIIIIII is the IP address, JJJJJJJJ is something unique across JVMs, HHHH is the High Time, LLLLLLLL is the low time, and CCCC is a count.

Specified by:
getIdentifier in class AbstractUIDGenerator
Returns:
The identifier


Copyright © 2009. All Rights Reserved.