Class NodeID
- java.lang.Object
-
- org.jivesoftware.openfire.cluster.NodeID
-
- All Implemented Interfaces:
Externalizable,Serializable
public class NodeID extends Object implements Externalizable
Class which wraps the byte[] we use to identify cluster members. The main reason for this class is that byte[] cannot be directly compared so having a collection of byte[] is not possible since you cannot remove to equivalent byte[] from the collection.- Author:
- Pete Matern, Gaston Dombiak
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NodeID()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddeleteInstance(byte[] nodeIdBytes)booleanequals(byte[] anotherID)booleanequals(Object o)static NodeIDgetInstance(byte[] nodeIdBytes)inthashCode()voidreadExternal(ObjectInput in)byte[]toByteArray()StringtoString()voidwriteExternal(ObjectOutput out)
-
-
-
Method Detail
-
getInstance
public static NodeID getInstance(byte[] nodeIdBytes)
-
deleteInstance
public static void deleteInstance(byte[] nodeIdBytes)
-
equals
public boolean equals(byte[] anotherID)
-
toByteArray
public byte[] toByteArray()
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-