Class TimestampValueGenerator

  • All Implemented Interfaces:
    ValueGenerator<java.lang.Long>

    public class TimestampValueGenerator
    extends AbstractGenerator<java.lang.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,
                                       java.lang.String name)
        Constructor.
        Parameters:
        storeMgr - StoreManager
        name - Symbolic name of the 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 Long.class)
      • reserveBlock

        protected ValueGenerationBlock<java.lang.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<java.lang.Long>
        Parameters:
        size - Number of elements to reserve.
        Returns:
        The block.