Class UniqueId

java.lang.Object
org.apache.catalina.tribes.UniqueId
All Implemented Interfaces:
Serializable

public final class UniqueId extends Object implements Serializable
Represents a globally unique Id.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new UniqueId with a null identifier.
    UniqueId(byte[] id)
    Constructs a new UniqueId from the given byte array.
    UniqueId(byte[] id, int offset, int length)
    Constructs a new UniqueId from a portion of the given byte array.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    byte[]
    Returns the raw bytes of this unique identifier.
    int
     
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • UniqueId

      public UniqueId()
      Constructs a new UniqueId with a null identifier.
    • UniqueId

      public UniqueId(byte[] id)
      Constructs a new UniqueId from the given byte array.
      Parameters:
      id - the byte array containing the identifier
    • UniqueId

      public UniqueId(byte[] id, int offset, int length)
      Constructs a new UniqueId from a portion of the given byte array.
      Parameters:
      id - the source byte array
      offset - the start offset
      length - the number of bytes
  • Method Details

    • hashCode

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

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getBytes

      public byte[] getBytes()
      Returns the raw bytes of this unique identifier.
      Returns:
      the byte array
    • toString

      public String toString()
      Overrides:
      toString in class Object