public abstract class AbstTimeBasedFactory extends UuidFactory implements NoArgsFactory
The time stamp has 100-nanoseconds resolution, starting from 1582-10-15, which is a date known as Gregorian Epoch. The the time stamp rolls over around AD 5235 (1582 + 2^60 / 365.25 / 24 / 60 / 60 / 10000000).
The node identifier can be:
The node identifier used by this factory can be controlled by defining a
system property 'uuidcreator.node' or an environment variable
'UUIDCREATOR_NODE'. The system property has preference over the
environment variable.
Options accepted by the system property and the environment variable:
If a property or variable is defined, all UUIDs generated by this factory will be based on it.
Otherwise, if no property or variable is defined, a random node identifier is generated once at instantiation. This is the default.
Example of system property definition:
# Append to VM arguments
-Duuidcreator.node="mac"
Example of environment variable definition:
# Append to ~/.profile
export UUIDCREATOR_NODE="mac"
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AbstTimeBasedFactory.Builder<T,B extends AbstTimeBasedFactory.Builder<T,B>>
Abstract builder for creating a time-based factory.
|
public UUID create()
create 在接口中 NoArgsFactoryCopyright © 2024. All rights reserved.