public class SequenceLongIdGenerator extends Object implements LongIdGenerator
LongIdGenerator that uses the current time and a local sequence
to create identifiers. This generator guarantees that identifiers are
always increasing, but is not suitable for distributed usage.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SEQUENCE |
| Constructor and Description |
|---|
SequenceLongIdGenerator() |
SequenceLongIdGenerator(java.time.Clock clock) |
public SequenceLongIdGenerator()
public SequenceLongIdGenerator(java.time.Clock clock)
public long next()
LongIdGeneratornext in interface LongIdGeneratorCopyright © 2017. All rights reserved.