public class ToEpochTimeUUID extends Object implements LongFunction<UUID>
ToFinestTimeUUID
instead. This method is to support simple mapping to natural timestamps
as we often find in the real world.
For the variants that have a String argument in the constructor, this is a parsable datetime that is used as the base time for all produced values. Setting this allows you to set the start of the time range for all timeuuid values produced. All times are parsed for UTC. All time use ISO date ordering, meaning that the most significant fields always go before the others.
The valid formats, in joda specifier form are:
| Constructor and Description |
|---|
ToEpochTimeUUID()
Create version 1 timeuuids with a per-host node and empty clock data.
|
ToEpochTimeUUID(long node)
Create version 1 timeuuids with a specific static node and empty clock data.
|
ToEpochTimeUUID(long node,
long clock)
Create version 1 timeuuids with a specific static node and specific clock data.
|
ToEpochTimeUUID(String baseSpec)
Create version 1 timeuuids with a per-host node and empty clock data.
|
ToEpochTimeUUID(String baseSpec,
long node)
Create version 1 timeuuids with a specific static node and empty clock data.
|
ToEpochTimeUUID(String baseSpec,
long node,
long clock)
Create version 1 timeuuids with a specific static node and specific clock data.
|
public ToEpochTimeUUID()
public ToEpochTimeUUID(long node)
node - a fixture value for testing that replaces node and clock bitspublic ToEpochTimeUUID(long node,
long clock)
node - a fixture value for testing that replaces node bitsclock - a fixture value for testing that replaces clock bitspublic ToEpochTimeUUID(String baseSpec)
baseSpec - - a string specification for the base time valuepublic ToEpochTimeUUID(String baseSpec, long node)
baseSpec - - a string specification for the base time valuenode - a fixture value for testing that replaces node and clock bitspublic ToEpochTimeUUID(String baseSpec, long node, long clock)
baseSpec - - a string specification for the base time valuenode - a fixture value for testing that replaces node bitsclock - a fixture value for testing that replaces clock bitspublic UUID apply(long timeTicks)
apply in interface LongFunction<UUID>Copyright © 2018. All rights reserved.