org.datanucleus.store.valuegenerator
Class TimestampGenerator

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.AbstractGenerator
      extended by org.datanucleus.store.valuegenerator.TimestampGenerator
All Implemented Interfaces:
ValueGenerator

public class TimestampGenerator
extends AbstractGenerator

Value generator for timestamps.


Field Summary
 
Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
 
Constructor Summary
TimestampGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected  ValueGenerationBlock reserveBlock(long size)
          Method to reserve a block of values.
 
Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator
allocate, createRepository, current, currentValue, getName, getStorageClass, next, nextValue, obtainGenerationBlock, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampGenerator

public TimestampGenerator(java.lang.String name,
                          java.util.Properties props)
Constructor.

Parameters:
name - Symbolic name of the generator
props - Any properties controlling its behaviour.
Method Detail

reserveBlock

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


Copyright © 2009. All Rights Reserved.