public class Uuid extends Object implements Comparable<Uuid>
| Modifier and Type | Field and Description |
|---|---|
static Uuid | METADATA_TOPIC_IDA UUID for the metadata topic in KRaft mode. |
static Uuid | ZERO_UUIDA UUID that represents a null or empty UUID. |
| Constructor and Description |
|---|
Uuid(long mostSigBits, long leastSigBits)Constructs a 128-bit type 4 UUID where the first long represents the most significant 64 bits and the second long represents the least significant 64 bits. |
| Modifier and Type | Method and Description |
|---|---|
int | compareTo(Uuid other) |
boolean | equals(Object obj)Returns true iff obj is another Uuid represented by the same two long values. |
static Uuid | fromString(String str)Creates a UUID based on a base64 string encoding used in the toString() method. |
long | getLeastSignificantBits()Returns the least significant bits of the UUID's 128 value. |
long | getMostSignificantBits()Returns the most significant bits of the UUID's 128 value. |
int | hashCode()Returns a hash code for this UUID |
static Uuid | randomUuid()Static factory to retrieve a type 4 (pseudo randomly generated) UUID. |
String | toString()Returns a base64 string encoding of the UUID. |
public static final Uuid METADATA_TOPIC_ID
public static final Uuid ZERO_UUID
public Uuid(long mostSigBits,
long leastSigBits)public static Uuid randomUuid()
public long getMostSignificantBits()
public long getLeastSignificantBits()
public boolean equals(Object obj)
public String toString()
public static Uuid fromString(String str)
public int compareTo(Uuid other)
compareTo in interface Comparable<Uuid>