Package org.opends.server.types
Class ProcessId
java.lang.Object
org.opends.server.types.ProcessId
Represents a process ID which allows differentiating DS and RS instances running in the same JVM.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanSimilar toequals(Object)except thatnewUnknownProcessId()is equal to itself.longReturns the least significant 64 bits of this process id's 128 bit value.longReturns the most significant 64 bits of this process id's 128 bit value.inthashCode()booleanWhether the current process id is unknown.static ProcessIdnewProcessId(long mostSigBits, long leastSigBits) Reads and decodes theProcessIdfrom the provided scanner.static ProcessIdReturns a randomly generatedProcessId.static ProcessIdReturns a new unknown process ID.toString()
-
Method Details
-
newRandomProcessId
Returns a randomly generatedProcessId.- Returns:
- a new
ProcessId
-
newUnknownProcessId
Returns a new unknown process ID.- Returns:
- a new unknown process ID
-
newProcessId
Reads and decodes theProcessIdfrom the provided scanner.- Parameters:
mostSigBits- The most significant bits of theProcessIdleastSigBits- The last significant bits of theProcessId- 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:
trueif the current process id is unknown,falseotherwise.
-
equals
-
equalsIgnoringUnknown
Similar toequals(Object)except thatnewUnknownProcessId()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
otherare equal.
-
hashCode
public int hashCode() -
toString
-