public final class RandomId128 extends Object implements Serializable
A globally unique identifier for objects.
Consists of 12 bytes, divided as follows:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| time | random long | ||||||||||||||
Instances of this class are immutable.
| Constructor and Description |
|---|
RandomId128(io.netty.buffer.ByteBuf buffer) |
RandomId128(long timestamp,
long random) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
long |
getRandom() |
long |
getTimestamp() |
int |
hashCode() |
static void |
main(String[] args) |
static RandomId128 |
next()
Gets a new object id.
|
String |
toHexString() |
String |
toString() |
void |
writeTo(io.netty.buffer.ByteBuf buffer) |
public RandomId128(long timestamp,
long random)
public RandomId128(io.netty.buffer.ByteBuf buffer)
public static RandomId128 next()
public static void main(String[] args)
public long getTimestamp()
public long getRandom()
public void writeTo(io.netty.buffer.ByteBuf buffer)
public String toHexString()
Copyright © 2019. All rights reserved.