org.objectweb.proactive.core
Class UniqueRuntimeID

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

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

UniqueRuntimeID is a unique runtime identifier across all jvm. It is made of a unique VMID combined with the runtime name.

Author:
ProActive Team
See Also:
Serialized Form

Constructor Summary
UniqueRuntimeID()
          Creates a new UniqueRuntimeID
UniqueRuntimeID(java.lang.String vmName)
           
UniqueRuntimeID(java.lang.String vmName, java.rmi.dgc.VMID vmID)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Overrides equals to take into account the two part of this UniqueRuntimeID.
 java.rmi.dgc.VMID getVMID()
          Returns the VMID of this UniqueID.
 java.lang.String getVMName()
          Returns the vmName part of this UniqueID.
 int hashCode()
          Overrides hashCode.
 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
 

Constructor Detail

UniqueRuntimeID

public UniqueRuntimeID()
Creates a new UniqueRuntimeID


UniqueRuntimeID

public UniqueRuntimeID(java.lang.String vmName)

UniqueRuntimeID

public UniqueRuntimeID(java.lang.String vmName,
                       java.rmi.dgc.VMID vmID)
Method Detail

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

getVMName

public java.lang.String getVMName()
Returns the vmName part of this UniqueID.

Returns:
the vmName 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. We are using the vmName hashCode to speedup computation.

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 UniqueRuntimeID.

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


Copyright 2001-2007 INRIA All Rights Reserved.