org.qi4j.library.uid.sequence
Interface Sequencing
- All Known Subinterfaces:
- PersistingSequencingService, TransientSequencingService
- All Known Implementing Classes:
- PersistedSequencingMixin, TransientSequencingMixin
public interface Sequencing
Sequencing is used to automatically generate a sequence of numbers.
The algorithm is that currentSequenceValue
is the number that was last returned
in a newSequenceValue
call, and will initially be zero. Persisting Sequencing
services defines "initially" as the first run ever, as subsequent starts may retrieve the
currentSequenceValue
from an EntityStore
newSequenceValue
Long newSequenceValue()
throws SequencingException
- Throws:
SequencingException
currentSequenceValue
Long currentSequenceValue()