Class UuidUtil

  extended by 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.
Method Summary
static UUID getTimeBasedUuid()
          Generates Type 1 UUID.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


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
Method Detail


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.
  1. Digits 1-12 are the lower 48 bits of the number of 100 ns increments since the start of the UUID epoch.
  2. Digit 13 is the version (with a value of 1).
  3. Digits 14-16 are a sequence number that is incremented each time a UUID is generated.
  4. Digit 17 is the variant (with a value of binary 10) and 10 bits of the sequence number
  5. Digit 18 is final 16 bits of the sequence number.
  6. Digits 19-32 represent the system the application is running on.

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.