public final class Identifiers extends Object
Identifiers generated by this class are 64-bit long values, suitable for use as unique identifiers in distributed systems, databases, or scenarios where uniqueness, randomness, or cryptographic strength are required.
| Modifier and Type | Method and Description |
|---|---|
static long |
next()
Generates the next sequential identifier.
|
static long |
random()
Generates a random identifier using a fast pseudo-random generator.
|
static long |
secureRandom()
Generates a secure random identifier using a cryptographically strong
generator.
|
public static long next()
public static long random()
public static long secureRandom()