Module com.github.f4b6a3.uuid
Class SuffixCombFactory
- java.lang.Object
-
- com.github.f4b6a3.uuid.factory.UuidFactory
-
- com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory
-
- com.github.f4b6a3.uuid.factory.AbstCombFactory
-
- com.github.f4b6a3.uuid.factory.nonstandard.SuffixCombFactory
-
- All Implemented Interfaces:
NoArgsFactory
public final class SuffixCombFactory extends AbstCombFactory
Concrete factory for creating Suffix COMB GUIDs.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-4122.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuffixCombFactory.Builder-
Nested classes/interfaces inherited from class com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory
AbstRandomBasedFactory.ByteRandom, AbstRandomBasedFactory.IRandom, AbstRandomBasedFactory.LongRandom
-
-
Field Summary
-
Fields inherited from class com.github.f4b6a3.uuid.factory.AbstCombFactory
clock, DEFAULT_CLOCK
-
Fields inherited from class com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory
random, UUID_BYTES
-
Fields inherited from class com.github.f4b6a3.uuid.factory.UuidFactory
version, versionMask
-
-
Constructor Summary
Constructors Constructor Description SuffixCombFactory()SuffixCombFactory(Clock clock)SuffixCombFactory(IntFunction<byte[]> randomFunction)SuffixCombFactory(IntFunction<byte[]> randomFunction, Clock clock)SuffixCombFactory(LongSupplier randomFunction)SuffixCombFactory(LongSupplier randomFunction, Clock clock)SuffixCombFactory(Random random)SuffixCombFactory(Random random, Clock clock)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SuffixCombFactory.Builderbuilder()UUIDcreate()Returns a Suffix COMB GUID.-
Methods inherited from class com.github.f4b6a3.uuid.factory.UuidFactory
getVersion, toUuid
-
-
-
-
Constructor Detail
-
SuffixCombFactory
public SuffixCombFactory()
-
SuffixCombFactory
public SuffixCombFactory(Clock clock)
-
SuffixCombFactory
public SuffixCombFactory(Random random)
-
SuffixCombFactory
public SuffixCombFactory(LongSupplier randomFunction)
-
SuffixCombFactory
public SuffixCombFactory(IntFunction<byte[]> randomFunction)
-
SuffixCombFactory
public SuffixCombFactory(LongSupplier randomFunction, Clock clock)
-
SuffixCombFactory
public SuffixCombFactory(IntFunction<byte[]> randomFunction, Clock clock)
-
-
Method Detail
-
builder
public static SuffixCombFactory.Builder builder()
-
create
public UUID create()
Returns a Suffix COMB GUID.- Returns:
- a UUIDv4
-
-