Class LazyUid

java.lang.Object
org.glassfish.jersey.internal.util.LazyUid
All Implemented Interfaces:
Serializable

public class LazyUid extends Object implements Serializable
Lazily initialized, thread-safe, random UUID. Useful for identifying instances for logging & debugging purposes.

The UUID value gets initialized with the first call to value() method. Once initialized, the UUID value stays the same.

Author:
Marek Potociar
See Also:
  • Constructor Details

    • LazyUid

      public LazyUid()
  • Method Details

    • value

      public String value()
      Return UUID value. The returned value is never null.
      Returns:
      UUID value.
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object