public interface Sequence
Sequence allows to get unique successive non-negative long numbers. Sequences are named, you can request a
sequence by name using method StoreTransaction.getSequence(String). Sequences are persistent, any
flushed or committed transaction saves all dirty (mutated) sequences which were
requested by transactions created against current PersistentEntityStore.
PersistentEntityStore implementation uses Sequences to generate EntityId instances.
StoreTransaction.getSequence(String)| Modifier and Type | Method and Description |
|---|---|
long |
get()
Returns current number obtained by last call to increment().
|
long |
increment()
Returns next non-negative number.
|
void |
set(long l)
Sets current number.
|
long increment()
Sequence, it starts from 0.long get()
-1.-1void set(long l)
l + 1.l - current number