public class SimpleLongIdGenerator extends Object implements LongIdGenerator
LongIdGenerator that uses the current time and a random number to
generate identifiers. The identifiers generated should be good enough
to be used on several machines with minimal risk of collission.| Modifier and Type | Field and Description |
|---|---|
static long |
EPOCH_START
Start of this generators epoch, 2013-01-01 00:00 GMT
|
static int |
MAX_RANDOM |
| Constructor and Description |
|---|
SimpleLongIdGenerator() |
public static final long EPOCH_START
public static final int MAX_RANDOM
public long next()
LongIdGeneratornext in interface LongIdGeneratorCopyright © 2016. All rights reserved.