public class DefaultClockSequenceStrategy extends AbstractSequence implements ClockSequenceStrategy
| Modifier and Type | Field and Description |
|---|---|
protected static int |
SEQUENCE_MAX |
protected static int |
SEQUENCE_MIN |
MAX_VALUE, MIN_VALUE, value| Constructor and Description |
|---|
DefaultClockSequenceStrategy() |
DefaultClockSequenceStrategy(long timestamp,
long nodeIdentifier,
UuidState state)
This constructor uses a state stored previously.
### RFC-4122 - 4.1.5.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getClockSequence(long timestamp,
long nodeIdentifier)
Get the next value for a timestamp and a node identifier.
### RFC-4122 - 4.1.5.
|
void |
reset() |
protected static final int SEQUENCE_MIN
protected static final int SEQUENCE_MAX
public DefaultClockSequenceStrategy()
public DefaultClockSequenceStrategy(long timestamp,
long nodeIdentifier,
UuidState state)
timestamp - the current timestampnodeIdentifier - the current node identifierstate - the previous state savedpublic int getClockSequence(long timestamp,
long nodeIdentifier)
getClockSequence in interface ClockSequenceStrategytimestamp - a timestampnodeIdentifier - a node identifierOverrunException - an overrun exceptionpublic void reset()
reset in interface Sequencereset in class AbstractSequenceCopyright © 2019. All rights reserved.