public class UniqueIdGenerator
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UniqueIdGenerator.IdKind
Kind of entities (generates values are unique only across specific kind of entities).
|
| Modifier and Type | Field and Description |
|---|---|
private static ContextLocal<java.util.Map<UniqueIdGenerator.IdKind,integer>> |
context
Context-local map of kinds of entities to the next available unique id for this kind.
|
| Constructor and Description |
|---|
UniqueIdGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static long |
getUniqueId(UniqueIdGenerator.IdKind kind)
Get new unique id for the specified kind of entities (see
UniqueIdGenerator.IdKind) in the current
user context. |
private static final ContextLocal<java.util.Map<UniqueIdGenerator.IdKind,integer>> context
public static long getUniqueId(UniqueIdGenerator.IdKind kind)
UniqueIdGenerator.IdKind) in the current
user context.kind - Kind of entities for which the id is generated.