Class AUIDGenerator.AUID.State

java.lang.Object
org.datanucleus.store.valuegenerator.AUIDGenerator.AUID.State
Enclosing class:
AUIDGenerator.AUID

protected static class AUIDGenerator.AUID.State extends Object
This class represents the current state of the AUID generator.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private long
    The time adjustment to be added to the last time stamp to create the next AUID.
    private int
    The current clock sequence.
    private boolean
    A flag indicating if security attributes should be included in time low field.
    private long
    The last time stamp used to create a AUID.
    private long
    The node value.
    private Random
    A random generator to be use for random initialization of fields.
    private int
    The variant to use when constructing new AUIDs.
    private int
    The version to use when constructing new AUIDs.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the time adjustment to be added to the last time stamp to create the next AUID.
    int
    Returns the current clock sequence.
    boolean
    Returns wether security attribute have to be included.
    long
    Returns the last time stamp used to create an AUID.
    long
    Returns the node value.
    Returns the random generator used for initialization of fields.
    int
    Returns the variant to use when constructing new AUIDs.
    int
    Returns the version to use when constructing new AUIDs.
    long
    Returns the time adjustment to be added to the last time stamp to create the next AUID and increments it.
    void
    setAdjustTime(long adjustTime)
    Sets the time adjustment to be added to the last time stamp to create the next AUID.
    void
    setClockSequence(int clockSequence)
    Sets the current clock sequence.
    void
    setIncludeSecurityAttributes(boolean includeSecurityAttributes)
    Sets if security attributes have to be included in time low field.
    void
    setLastTime(long lastTime)
    Sets the last time stamp used to create an AUID.
    void
    setNode(long node)
    Set the node value.
    void
    setRandom(Random random)
    Sets the random generator used for initialization of fields.
    void
    setVariant(int variant)
    Sets the variant to use when constructing new AUIDs.
    void
    setVersion(int version)
    Sets the version to use when constructing new AUIDs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • lastTime

      private long lastTime
      The last time stamp used to create a AUID.
    • adjustTime

      private long adjustTime
      The time adjustment to be added to the last time stamp to create the next AUID.
    • clockSequence

      private int clockSequence
      The current clock sequence.
    • node

      private long node
      The node value.
    • version

      private int version
      The version to use when constructing new AUIDs.
    • variant

      private int variant
      The variant to use when constructing new AUIDs.
    • random

      private Random random
      A random generator to be use for random initialization of fields.
    • includeSecurityAttributes

      private boolean includeSecurityAttributes
      A flag indicating if security attributes should be included in time low field.
  • Constructor Details

    • State

      protected State()
  • Method Details

    • setLastTime

      public void setLastTime(long lastTime)
      Sets the last time stamp used to create an AUID.
      Parameters:
      lastTime - the last time stamp used to create an AUID.
    • getLastTime

      public long getLastTime()
      Returns the last time stamp used to create an AUID.
      Returns:
      the last time stamp used to create an AUID.
    • setAdjustTime

      public void setAdjustTime(long adjustTime)
      Sets the time adjustment to be added to the last time stamp to create the next AUID.
      Parameters:
      adjustTime - The time adjustment to be added to the last time stamp to create the next AUID.
    • getAdjustTime

      public long getAdjustTime()
      Returns the time adjustment to be added to the last time stamp to create the next AUID.
      Returns:
      The time adjustment to be added to the last time stamp to create the next AUID.
    • incrementAdjustTime

      public long incrementAdjustTime()
      Returns the time adjustment to be added to the last time stamp to create the next AUID and increments it.
      Returns:
      The time adjustment to be added to the last time stamp to create the next AUID before incrementation.
    • setClockSequence

      public void setClockSequence(int clockSequence)
      Sets the current clock sequence.
      Parameters:
      clockSequence - the current clock sequence.
    • getClockSequence

      public int getClockSequence()
      Returns the current clock sequence.
      Returns:
      the current clock sequence.
    • setNode

      public void setNode(long node)
      Set the node value.
      Parameters:
      node - the node value.
    • getNode

      public long getNode()
      Returns the node value.
      Returns:
      the node value.
    • setVersion

      public void setVersion(int version)
      Sets the version to use when constructing new AUIDs.
      Parameters:
      version - the version to use when constructing new AUIDs.
    • getVersion

      public int getVersion()
      Returns the version to use when constructing new AUIDs.
      Returns:
      the version to use when constructing new AUIDs.
    • setVariant

      public void setVariant(int variant)
      Sets the variant to use when constructing new AUIDs.
      Parameters:
      variant - the variant to use when constructing new AUIDs.
    • getVariant

      public int getVariant()
      Returns the variant to use when constructing new AUIDs.
      Returns:
      the variant to use when constructing new AUIDs.
    • setRandom

      public void setRandom(Random random)
      Sets the random generator used for initialization of fields.
      Parameters:
      random - the random generator to use for initialization of fields.
    • getRandom

      public Random getRandom()
      Returns the random generator used for initialization of fields.
      Returns:
      the random generator used for initialization of fields.
    • setIncludeSecurityAttributes

      public void setIncludeSecurityAttributes(boolean includeSecurityAttributes)
      Sets if security attributes have to be included in time low field.
      Parameters:
      includeSecurityAttributes - if true security attributes will included.
    • getIncludeSecurityAttributes

      public boolean getIncludeSecurityAttributes()
      Returns wether security attribute have to be included.
      Returns:
      true if security attributes have to be included.