- java.lang.Object
-
- org.datanucleus.store.valuegenerator.AbstractGenerator<Timestamp>
-
- org.datanucleus.store.valuegenerator.TimestampGenerator
-
- All Implemented Interfaces:
ValueGenerator<Timestamp>
public class TimestampGenerator extends AbstractGenerator<Timestamp>
Value generator for timestamps.
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, name, storeMgr
-
Fields inherited from interface org.datanucleus.store.valuegenerator.ValueGenerator
PROPERTY_CATALOG_NAME, PROPERTY_CLASS_NAME, PROPERTY_COLUMN_NAME, PROPERTY_FIELD_NAME, PROPERTY_KEY_CACHE_SIZE, PROPERTY_KEY_DATABASE_CACHE_SIZE, PROPERTY_KEY_INITIAL_VALUE, PROPERTY_KEY_MAX_VALUE, PROPERTY_KEY_MIN_VALUE, PROPERTY_ROOT_CLASS_NAME, PROPERTY_SCHEMA_NAME, PROPERTY_SEQUENCE_NAME, PROPERTY_SEQUENCETABLE_CATALOG, PROPERTY_SEQUENCETABLE_NAME_COLUMN, PROPERTY_SEQUENCETABLE_NEXTVAL_COLUMN, PROPERTY_SEQUENCETABLE_SCHEMA, PROPERTY_SEQUENCETABLE_TABLE, PROPERTY_TABLE_NAME
-
-
Constructor Summary
Constructors Constructor Description TimestampGenerator(StoreManager storeMgr, String name)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Class
getStorageClass()
Accessor for the storage class for values generated with this generator.protected ValueGenerationBlock<Timestamp>
reserveBlock(long size)
Method to reserve a block of values.-
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocate, current, currentValue, getName, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, reserveBlock
-
-
-
-
Constructor Detail
-
TimestampGenerator
public TimestampGenerator(StoreManager storeMgr, String name)
Constructor.- Parameters:
storeMgr
- StoreManagername
- 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 Timestamp.class)
-
reserveBlock
protected ValueGenerationBlock<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 classAbstractGenerator<Timestamp>
- Parameters:
size
- Number of elements to reserve.- Returns:
- The block.
-
-