public class ObjectId
extends java.lang.Object
implements java.io.Externalizable, java.lang.Comparable
ObjectId
.Constructor and Description |
---|
ObjectId()
Default constructor
|
ObjectId(ClusterId serverId,
ClusterId objId)
Creates a new identifier
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compare two ObjectIds
|
boolean |
equals(java.lang.Object o)
Test if two ObjectIds are equals
|
ClusterId |
getServerId()
Get the ServerId associated with the current object
|
int |
hashCode()
Compute hashcode
|
static void |
main(java.lang.String[] args)
Useful for tests only.
|
static ObjectId |
read(java.io.DataInput in)
Read an ObjectId from the input stream
|
void |
readExternal(java.io.ObjectInput in) |
java.lang.String |
toString() |
void |
write(java.io.DataOutput out)
Write an ObjectId on the ouput stream
|
void |
writeExternal(java.io.ObjectOutput out) |
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to compare with thispublic int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- object to compare with thispublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
Externalizable.readExternal(java.io.ObjectInput)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
Externalizable.writeExternal(java.io.ObjectOutput)
public static ObjectId read(java.io.DataInput in) throws java.io.IOException
in
- inputjava.io.IOException
- if an I/O error occurspublic void write(java.io.DataOutput out) throws java.io.IOException
out
- outputjava.io.IOException
- if an I/O error occurspublic ClusterId getServerId()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
- Exception