| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.kernel.TimeSeededSeq
public class TimeSeededSeq
A simplistic implementation of a Seq used
 to provide datastore ids. Starts with an id equal to the system's
 current time in milliseconds and increments from there.
| Field Summary | 
|---|
| Fields inherited from interface org.apache.openjpa.kernel.Seq | 
|---|
| TYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL | 
| Constructor Summary | |
|---|---|
| TimeSeededSeq() | |
| Method Summary | |
|---|---|
|  void | allocate(int additional,
         StoreContext ctx,
         ClassMetaData meta)Allocate additional values efficiently. | 
|  void | close()Free resources used by this sequence. | 
|  java.lang.Object | current(StoreContext ctx,
        ClassMetaData meta)Return the current value of the sequence, or null if not available. | 
|  int | getIncrement() | 
|  java.lang.Object | next(StoreContext ctx,
     ClassMetaData meta)Return the next value in the sequence. | 
|  void | setIncrement(int increment) | 
|  void | setType(int type)Set the type of sequence. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public TimeSeededSeq()
| Method Detail | 
|---|
public void setType(int type)
Seq
setType in interface Seqpublic int getIncrement()
public void setIncrement(int increment)
public java.lang.Object next(StoreContext ctx,
                             ClassMetaData meta)
Seq
next in interface Seqctx - the current contextmeta - if this is a datastore identity sequence, the
 persistent class the identity value is for; else null
public java.lang.Object current(StoreContext ctx,
                                ClassMetaData meta)
Seq
current in interface Seqctx - the current contextmeta - if this is a datastore identity sequence, the
 persistent class the identity value is for; else null
public void allocate(int additional,
                     StoreContext ctx,
                     ClassMetaData meta)
Seq
allocate in interface Seqctx - the current contextmeta - if this is a datastore identity sequence, the
 persistent class the identity value is for; else nullpublic void close()
Seq
close in interface Seqclose in interface Closeable| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||