public class LexicalOrderGuidCreator extends AbstractUuidCreator implements NoArgumentsUuidCreator
| Modifier and Type | Field and Description |
|---|---|
protected static String |
OVERFLOW_MESSAGE |
protected TimestampStrategy |
timestampStrategy |
NIL_UUID, RFC4122_VARIANT_BITS, RFC4122_VERSION_BITS, version| Constructor and Description |
|---|
LexicalOrderGuidCreator() |
| Modifier and Type | Method and Description |
|---|---|
UUID |
create()
Return a Lexical Order GUID.
|
protected void |
increment()
Increment the random part of the GUID.
|
protected void |
reset()
Reset the random part of the GUID.
|
<T extends LexicalOrderGuidCreator> |
withTimestampStrategy(TimestampStrategy timestampStrategy)
Used for changing the timestamp strategy.
|
getVariantBits, getVersion, getVersionBits, setVariantBits, setVersionBits, validprotected static final String OVERFLOW_MESSAGE
protected TimestampStrategy timestampStrategy
public UUID create()
create in interface NoArgumentsUuidCreatorUUID a UUID valueUuidCreatorException - an overflow exception if too many requests within the same
millisecond causes an overflow when incrementing the random
bits of the GUID.protected void reset()
protected void increment()
UuidCreatorException - if an overflow happens.public <T extends LexicalOrderGuidCreator> T withTimestampStrategy(TimestampStrategy timestampStrategy)
timestampStrategy - a timestamp strategyLexicalOrderGuidCreatorCopyright © 2019. All rights reserved.