SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.xmlstore
Class TimeSeededSequenceGenerator

java.lang.Object
  |
  +--kodo.xmlstore.TimeSeededSequenceGenerator
All Implemented Interfaces:
SequenceGenerator

public class TimeSeededSequenceGenerator
extends Object
implements SequenceGenerator

A simplistic implementation of a SequenceGenerator used to provide datastore ids. Starts with an id equal to the system's current time in milliseconds and increments from there.


Constructor Summary
TimeSeededSequenceGenerator()
           
 
Method Summary
 boolean ensureCapacity(int count)
          Ensures that this sequence generator has sufficient capacity readily available to provide count new sequence values.
 Number getNext()
          Returns the next Number in the sequence.
 long next()
          Returns the next long in the sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeSeededSequenceGenerator

public TimeSeededSequenceGenerator()
Method Detail

ensureCapacity

public boolean ensureCapacity(int count)
Description copied from interface: SequenceGenerator
Ensures that this sequence generator has sufficient capacity readily available to provide count new sequence values.
Specified by:
ensureCapacity in interface SequenceGenerator
Following copied from interface: kodo.runtime.SequenceGenerator
Returns:
true if the generator can service count requests without returning to the datastore; else false

getNext

public Number getNext()
Description copied from interface: SequenceGenerator
Returns the next Number in the sequence.
Specified by:
getNext in interface SequenceGenerator

next

public long next()
Description copied from interface: SequenceGenerator
Returns the next long in the sequence.
Specified by:
next in interface SequenceGenerator

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.