org.datanucleus.store.valuegenerator
Class AbstractUUIDGenerator

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.AbstractGenerator
      extended by org.datanucleus.store.valuegenerator.AbstractUIDGenerator
          extended by org.datanucleus.store.valuegenerator.AbstractUUIDGenerator
All Implemented Interfaces:
ValueGenerator
Direct Known Subclasses:
UUIDHexGenerator, UUIDStringGenerator

public abstract class AbstractUUIDGenerator
extends AbstractUIDGenerator

Value generator for a UUID format. To be extended by implementations giving the UUID in particular forms.


Field Summary
protected static short counter
           
protected static int IP_ADDRESS
          IP Address of local machine.
protected static int JVM_UNIQUE
          Unique value across JVMs on this machine.
 
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
 
Constructor Summary
AbstractUUIDGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected  short getCount()
          Simple counter for identities.
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractUIDGenerator
getIdentifier, 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
 

Field Detail

IP_ADDRESS

protected static final int IP_ADDRESS
IP Address of local machine.


JVM_UNIQUE

protected static final int JVM_UNIQUE
Unique value across JVMs on this machine.


counter

protected static short counter
Constructor Detail

AbstractUUIDGenerator

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

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

getCount

protected short getCount()
Simple counter for identities.

Returns:
The next count value


Copyright © 2010. All Rights Reserved.