|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.carol.cmi.ClusterId
public class ClusterId
A universally unique identifier for a cluster
Constructor Summary | |
---|---|
ClusterId()
Create a new identifier |
|
ClusterId(byte[] id)
Create a new identifier from an array of byte |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
Compare two identifier |
byte[] |
getBytes()
get the identifier in array of bytes type |
int |
hashCode()
get the hascode |
static void |
main(java.lang.String[] args)
Useful for tests only. |
boolean |
match(byte[] ar)
Compare two identifiers |
static ClusterId |
read(java.io.DataInput in)
Read an identifier from an input stream (java.io.DataInput) |
void |
readExternal(java.io.ObjectInput in)
Read an identifier from an input stream (java.io.ObjectInput) |
java.lang.String |
toString()
Readable format. |
void |
write(java.io.DataOutput out)
Write an identifier on the output stream (java.io.DataOutput) |
void |
writeExternal(java.io.ObjectOutput out)
Write an identifier on the output stream (java.io.ObjectOutput) |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClusterId()
public ClusterId(byte[] id)
id
- array of byteMethod Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean match(byte[] ar)
ar
- array of bytes to compare with the identifier
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to compare
public byte[] getBytes()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- the input stream
java.io.IOException
- if exception is encountered
java.lang.ClassNotFoundException
- if exception is encounteredpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- the output stream
java.io.IOException
- if exception is encounteredpublic static ClusterId read(java.io.DataInput in) throws java.io.IOException
in
- the input stream
java.io.IOException
- if exception is encounteredpublic void write(java.io.DataOutput out) throws java.io.IOException
out
- the output stream
java.io.IOException
- if exception is encounteredpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- arguments list
java.lang.Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |