org.apache.logging.log4j.core.util
Class UuidUtil
java.lang.Object
org.apache.logging.log4j.core.util.UuidUtil
public final class UuidUtil
- extends Object
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 |
static String |
UUID_SEQUENCE
System property that may be used to seed the UUID generation with an integer value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UUID_SEQUENCE
public static final String UUID_SEQUENCE
- System property that may be used to seed the UUID generation with an integer value.
- See Also:
- Constant Field Values
getTimeBasedUuid
public static UUID 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)
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.