Class ProcessId

java.lang.Object
org.opends.server.types.ProcessId

public final class ProcessId extends Object
Represents a process ID which allows differentiating DS and RS instances running in the same JVM.
  • Method Details

    • newRandomProcessId

      public static ProcessId newRandomProcessId()
      Returns a randomly generated ProcessId.
      Returns:
      a new ProcessId
    • newUnknownProcessId

      public static ProcessId newUnknownProcessId()
      Returns a new unknown process ID.
      Returns:
      a new unknown process ID
    • newProcessId

      public static ProcessId newProcessId(long mostSigBits, long leastSigBits)
      Reads and decodes the ProcessId from the provided scanner.
      Parameters:
      mostSigBits - The most significant bits of the ProcessId
      leastSigBits - The last significant bits of the ProcessId
      Returns:
      The decoded processID.
    • getMostSignificantBits

      public long getMostSignificantBits()
      Returns the most significant 64 bits of this process id's 128 bit value.
      Returns:
      The most significant 64 bits of this process id's 128 bit value
    • getLeastSignificantBits

      public long getLeastSignificantBits()
      Returns the least significant 64 bits of this process id's 128 bit value.
      Returns:
      The least significant 64 bits of this process id's 128 bit value
    • isUnknown

      public boolean isUnknown()
      Whether the current process id is unknown.
      Returns:
      true if the current process id is unknown, false otherwise.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • equalsIgnoringUnknown

      public boolean equalsIgnoringUnknown(Object o)
      Similar to equals(Object) except that newUnknownProcessId() is equal to itself.

      Only use this method when another field can act as a tie breaker.

      Parameters:
      o - the other object
      Returns:
      whether the current process id and other are equal.
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object