public class UniqueId extends Object
The default UniqueIdCodec use 43 bits to present timestamp, 9 bits to present a distributed instance id, and 11 bits to present a sequence number.
| Modifier and Type | Method and Description |
|---|---|
static UniqueId |
decode(long id) |
static long |
encode(long timeMillis,
long instance,
long sequence) |
boolean |
equals(Object o) |
static UniqueIdCodec |
getCodec() |
long |
getInstance() |
long |
getSequence() |
long |
getTimestamp() |
long |
getValue() |
int |
hashCode() |
String |
toString() |
static UniqueId |
valueOf(long id) |
static UniqueId |
valueOf(long timeMillis,
long instance,
long sequence) |
public static UniqueId valueOf(long timeMillis, long instance, long sequence)
public static UniqueId valueOf(long id)
public static UniqueId decode(long id)
public static long encode(long timeMillis,
long instance,
long sequence)
public static UniqueIdCodec getCodec()
public long getTimestamp()
public long getInstance()
public long getSequence()
public long getValue()
Copyright © 2018 The Struqt Project. All rights reserved.