Class UuidUtil
java.lang.Object
org.apache.logging.log4j.core.util.UuidUtil
Generates a unique ID. The generated UUID will be unique for approximately 8,925 years so long as
less than 10,000 IDs are generated per millisecond on the same device (as identified by its MAC address).
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
System property that may be used to seed the UUID generation with an integer value. -
Method Summary
-
Field Details
-
UUID_SEQUENCE
System property that may be used to seed the UUID generation with an integer value.- See Also:
-
-
Method Details
-
getTimeBasedUuid
Generates Type 1 UUID. The time contains the number of 100NS intervals that have occurred since 00:00:00.00 UTC, 10 October 1582. Each UUID on a particular machine is unique to the 100NS interval until they rollover around 3400 A.D.- Digits 1-12 are the lower 48 bits of the number of 100 ns increments since the start of the UUID epoch.
- Digit 13 is the version (with a value of 1).
- Digits 14-16 are a sequence number that is incremented each time a UUID is generated.
- Digit 17 is the variant (with a value of binary 10) and 10 bits of the sequence number
- Digit 18 is final 16 bits of the sequence number.
- Digits 19-32 represent the system the application is running on.
- Returns:
- universally unique identifiers (UUID)
-