org.jpox.store.poid
Class TimestampValuePoidGenerator

java.lang.Object
  extended by org.jpox.store.poid.AbstractPoidGenerator
      extended by org.jpox.store.poid.TimestampValuePoidGenerator
All Implemented Interfaces:
PoidGenerator

public class TimestampValuePoidGenerator
extends AbstractPoidGenerator

Value generator for timestamp values (millisecs). The "timestamps" are the number of milliseconds (since Jan 1 1970).


Field Summary
 
Fields inherited from class org.jpox.store.poid.AbstractPoidGenerator
allocationSize, initialValue, LOCALISER, name, poidBlock, properties
 
Constructor Summary
TimestampValuePoidGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected  PoidBlock reserveBlock(long size)
          Method to reserve a block of poids.
 
Methods inherited from class org.jpox.store.poid.AbstractPoidGenerator
allocate, createRepository, current, currentValue, getName, getStorageClass, next, nextValue, obtainPoidBlock, obtainPoidBlock, requiresRepository, reserveBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampValuePoidGenerator

public TimestampValuePoidGenerator(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 PoidBlock reserveBlock(long size)
Method to reserve a block of poids. Only ever reserves a single timestamp, to the time at which it is created.

Specified by:
reserveBlock in class AbstractPoidGenerator
Parameters:
size - Number of elements to reserve.
Returns:
The block.


Copyright © -2008 . All Rights Reserved.