public class CombGuidCreator extends AbstractUuidCreator implements NoArgumentsUuidCreator
LexicalOrderGuidCreator.
The Cost of GUIDs as Primary Keys (COMB GUID inception):
http://www.informit.com/articles/article.aspx?p=25862
ULID specification: https://github.com/ulid/spec| 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 |
|---|
CombGuidCreator() |
| Modifier and Type | Method and Description |
|---|---|
UUID |
create()
Return a COMB GUID.
|
protected void |
increment()
Increment the random part of the GUID.
|
protected void |
reset()
Reset the random part of the GUID.
|
<T extends CombGuidCreator> |
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()
LexicalOrderGuidCreator.create()create in interface NoArgumentsUuidCreatorprotected void reset()
protected void increment()
UuidCreatorException - if an overflow happens.public <T extends CombGuidCreator> T withTimestampStrategy(TimestampStrategy timestampStrategy)
timestampStrategy - a timestamp strategyCombGuidCreatorCopyright © 2019. All rights reserved.