Class AbstractUUIDGenerator

    • Field Detail

      • IP_ADDRESS

        static final int IP_ADDRESS
        IP Address of local machine.
      • JVM_UNIQUE

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

        static short counter
    • Constructor Detail

      • AbstractUUIDGenerator

        public AbstractUUIDGenerator​(StoreManager storeMgr,
                                     java.lang.String name)
        Constructor.
        Parameters:
        storeMgr - StoreManager
        name - Symbolic name for this generator
    • Method Detail

      • getStorageClass

        public static java.lang.Class getStorageClass()
        Accessor for the storage class for values generated with this generator.
        Returns:
        Storage class (in this case String.class)
      • reserveBlock

        protected ValueGenerationBlock<java.lang.String> reserveBlock​(long size)
        Method to reserve "size" values to the block.
        Specified by:
        reserveBlock in class AbstractGenerator<java.lang.String>
        Parameters:
        size - The block size
        Returns:
        The reserved block
      • getIdentifier

        protected abstract java.lang.String getIdentifier()
        Create an identifier in the required UUID format required.
        Returns:
        The identifier
      • getCount

        protected short getCount()
        Simple counter for identities.
        Returns:
        The next count value
      • getIntFromByteArray

        private static int getIntFromByteArray​(byte[] bytes)
        Utility to convert a byte array to an int.
        Parameters:
        bytes - The byte array
        Returns:
        The int