Class TimestampGenerator

  • All Implemented Interfaces:
    ValueGenerator<java.sql.Timestamp>

    public class TimestampGenerator
    extends AbstractGenerator<java.sql.Timestamp>
    Value generator for timestamps.
    • Constructor Detail

      • TimestampGenerator

        public TimestampGenerator​(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 Timestamp.class)
      • reserveBlock

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