public final class SuffixCombFactory extends AbstCombFactory
A Suffix COMB GUID is a UUID that combines a creation time with random bits.
The creation millisecond is a 6 bytes SUFFIX at the LEAST significant bits.
The created UUID is a UUIDv4 for compatibility with RFC 9562.
| Modifier and Type | Class and Description |
|---|---|
static class |
SuffixCombFactory.Builder
Builder of factories.
|
AbstRandomBasedFactory.FastRandom, AbstRandomBasedFactory.IRandom, AbstRandomBasedFactory.SafeRandomUuidFactory.ParameterstimeFunctionlock, random, UUID_BYTESversion, versionMask| Constructor and Description |
|---|
SuffixCombFactory()
Default constructor.
|
SuffixCombFactory(Clock clock)
Constructor with a clock.
|
SuffixCombFactory(LongSupplier randomFunction)
Constructor with a function which return random numbers.
|
SuffixCombFactory(LongSupplier randomFunction,
Clock clock)
Constructor with a function which a function which return random numbers and
a clock.
|
SuffixCombFactory(Random random)
Constructor with a random.
|
SuffixCombFactory(Random random,
Clock clock)
Constructor with a random and a clock.
|
| Modifier and Type | Method and Description |
|---|---|
static SuffixCombFactory.Builder |
builder()
Returns a new builder.
|
UUID |
create()
Returns a Suffix COMB GUID.
|
creategetVersion, nameBytes, nameBytes, namespaceBytes, namespaceBytes, namespaceBytes, toUuidpublic SuffixCombFactory()
public SuffixCombFactory(Clock clock)
clock - a clockpublic SuffixCombFactory(Random random)
random - a random generatorpublic SuffixCombFactory(Random random, Clock clock)
random - a randomclock - a clockpublic SuffixCombFactory(LongSupplier randomFunction)
randomFunction - a functionpublic SuffixCombFactory(LongSupplier randomFunction, Clock clock)
randomFunction - a functionclock - a clockpublic static SuffixCombFactory.Builder builder()
public UUID create()
create in class UuidFactoryCopyright © 2024. All rights reserved.