org.objectweb.proactive.core
Class UniqueID

java.lang.Object
  extended by org.objectweb.proactive.core.UniqueID
All Implemented Interfaces:
java.io.Serializable

public class UniqueID
extends java.lang.Object
implements java.io.Serializable

UniqueID is a unique object identifier across all jvm. It is made of a unique VMID combined with a unique UID on that VM.

The UniqueID is used to identify object globally, even in case of migration.

Since:
ProActive 0.9
Version:
1.0, 2001/10/23
Author:
ProActive Team
See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
UniqueID()
          Creates a new UniqueID
 
Method Summary
 void echo()
          for debug purpose
 boolean equals(java.lang.Object o)
          Overrides equals to take into account the two part of this UniqueID.
static java.rmi.dgc.VMID getCurrentVMID()
          Returns the VMID of the current VM in which this class has been loaded.
 java.rmi.server.UID getUID()
          Returns the UID part of this UniqueID.
 java.rmi.dgc.VMID getVMID()
          Returns the VMID of this UniqueID.
 int hashCode()
          Overrides hashCode to take into account the two part of this UniqueID.
 java.lang.String toString()
          Returns a string representation of this UniqueID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

UniqueID

public UniqueID()
Creates a new UniqueID

Method Detail

getCurrentVMID

public static java.rmi.dgc.VMID getCurrentVMID()
Returns the VMID of the current VM in which this class has been loaded.

Returns:
the VMID of the current VM

getVMID

public java.rmi.dgc.VMID getVMID()
Returns the VMID of this UniqueID. Note that the VMID of one UniqueID may differ from the local VMID (that one can get using getCurrentVMID() in case this UniqueID is attached to an object that has migrated.

Returns:
the VMID part of this UniqueID

getUID

public java.rmi.server.UID getUID()
Returns the UID part of this UniqueID.

Returns:
the UID part of this UniqueID

toString

public java.lang.String toString()
Returns a string representation of this UniqueID.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this UniqueID

hashCode

public int hashCode()
Overrides hashCode to take into account the two part of this UniqueID.

Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode of this object

equals

public boolean equals(java.lang.Object o)
Overrides equals to take into account the two part of this UniqueID.

Overrides:
equals in class java.lang.Object
Returns:
the true if and only if o is an UniqueID equals to this UniqueID

echo

public void echo()
for debug purpose



Copyright 2001-2007 INRIA All Rights Reserved.