public final class TimeOrderedFactory extends AbstTimeBasedFactory
UUIDv6 is a new UUID version proposed by Peabody and Davis.
Warning: this can change in the future.
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeOrderedFactory.Builder
Concrete builder for creating a time-ordered factory.
|
UuidFactory.ParametersclockseqFunction, lock, nodeidFunction, timeFunctionversion, versionMask| Constructor and Description |
|---|
TimeOrderedFactory()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static TimeOrderedFactory.Builder |
builder()
Returns a builder of random-ordered factory.
|
protected long |
formatMostSignificantBits(long timestamp)
Returns the most significant bits of the UUID.
|
create, create, formatLeastSignificantBits, selectNodeIdFunction, selectTimeFunctiongetVersion, nameBytes, nameBytes, namespaceBytes, namespaceBytes, namespaceBytes, toUuidprotected long formatMostSignificantBits(long timestamp)
It implements the algorithm for generating UUIDv6.
formatMostSignificantBits in class AbstTimeBasedFactorytimestamp - the number of 100-nanoseconds since 1970-01-01 (Unix epoch)public static TimeOrderedFactory.Builder builder()
Copyright © 2024. All rights reserved.