public class IdHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.concurrent.atomic.AtomicLong |
nextLongUniqueId
Source of sequential 64 bit id's starting at random point - should be unique
enough.
|
Constructor and Description |
---|
IdHelper() |
Modifier and Type | Method and Description |
---|---|
static long |
generateLongUniqueId()
Generate a 64bit ID that is guaranteed to be unique within a session and is
very likely to be unique between sessions too (ID counter starts at random
point determined on startup and then incremented by 1 on every call)
|
static java.lang.String |
generateShortUuid()
Generate UUID that's repackaged as BASE64 string.
|
private static java.util.concurrent.atomic.AtomicLong nextLongUniqueId
public static java.lang.String generateShortUuid()
public static long generateLongUniqueId()