public final class ObjID extends Object implements Serializable
UID
that
ensures uniqueness.Modifier and Type | Field and Description |
---|---|
static int |
ACTIVATOR_ID
Defines the ID of the activator.
|
static int |
DGC_ID
Defines the ID of the distributed garbage collector.
|
static int |
REGISTRY_ID
Defines the ID of the naming service.
|
Constructor and Description |
---|
ObjID()
Create the new object id, unique for this host.
|
ObjID(int id)
Create the new object id defining the well known remotely accessible
object, present in this host.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare for equality.
|
int |
hashCode()
Get the hashcode.
|
static ObjID |
read(ObjectInput in)
Read object id (as long), then the object
UID . |
String |
toString()
Get the string representation.
|
void |
write(ObjectOutput out)
Write object id as long, then the object
UID . |
public static final int REGISTRY_ID
public static final int ACTIVATOR_ID
public static final int DGC_ID
public ObjID()
public ObjID(int id)
REGISTRY_ID
- RMI naming service.ACTIVATOR_ID
- activatorDGC_ID
- distributed garbage collector (grants lease
durations to keep the object before it is garbage collected.id
- the well known object id, one of the above.public void write(ObjectOutput out) throws IOException
UID
.IOException
public static ObjID read(ObjectInput in) throws IOException
UID
.IOException
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)
public boolean equals(Object obj)
equals
in class Object
obj
- the Object to compare toObject.hashCode()
public String toString()
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)