Class TimestampValueGenerator

  • All Implemented Interfaces:
    ValueGenerator<Long>

    public class TimestampValueGenerator
    extends AbstractGenerator<Long>
    Value generator for timestamp values (millisecs). The "timestamps" are the number of milliseconds (since Jan 1 1970).
    • Constructor Detail

      • TimestampValueGenerator

        public TimestampValueGenerator​(StoreManager storeMgr,
                                       String name)
        Constructor.
        Parameters:
        storeMgr - StoreManager
        name - Symbolic name of the generator
    • Method Detail

      • getStorageClass

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

        protected ValueGenerationBlock<Long> reserveBlock​(long size)
        Method to reserve a block of values. Only ever reserves a single timestamp, to the time at which it is created.
        Specified by:
        reserveBlock in class AbstractGenerator<Long>
        Parameters:
        size - Number of elements to reserve.
        Returns:
        The block.