public class SimpleIdGenerator extends java.lang.Object implements IdGenerator
IdGenerator
that starts at 1 and increments by 1 with each call.Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicLong |
leastSigBits |
private java.util.concurrent.atomic.AtomicLong |
mostSigBits |
Constructor and Description |
---|
SimpleIdGenerator() |
Modifier and Type | Method and Description |
---|---|
java.util.UUID |
generateId()
Generate a new identifier.
|
private final java.util.concurrent.atomic.AtomicLong mostSigBits
private final java.util.concurrent.atomic.AtomicLong leastSigBits
public java.util.UUID generateId()
IdGenerator
generateId
in interface IdGenerator