java.rmi.dgc
Class VMID
public final
class
VMID
extends Object
implements Serializable
An identifier that is unique accross the all virtual machines. This class is
used by distributed garbage collector to identify the virtual machine of
the client, but may also be used in various other cases, when such identifier
is required. This class separately stores and transfers the host IP
address, but will try to do its best also for the case if it failed to
determine it. The alternative algorithms are used in {@link UID} that is
part of this class. The VMID's, created on the same host, but in the two
separately (parallely) running virtual machines are different.
Method Summary |
boolean | equals(Object obj)
Returns true if the passed parameter is also VMID and it is equal to this
VMID. |
int | hashCode()
Get the hash code of this VMID. |
static boolean | isUnique()
Return true if it is possible to get the accurate address of this host.
|
String | toString()
Get the string representation of this VMID. |
public VMID()
Create the new VMID. All VMID's are unique accross tha all virtual
machines.
public boolean equals(
Object obj)
Returns true if the passed parameter is also VMID and it is equal to this
VMID. The VMID should only be equal to itself (also if the passed value is
another instance, cloned by serialization).
public int hashCode()
Get the hash code of this VMID.
public static boolean isUnique()
Deprecated: VMID's are more or less always reliable.
Return true if it is possible to get the accurate address of this host.
If false is returned, the created VMID's are less reliable, but the
starting time and possibly the memory allocation are also taken into
consideration in the incorporated UID. Hence the VMID's, created on the
different virtual machines, still should be different.
Returns: false if the local host ip address is 127.0.0.1 or unknown,
true otherwise.
Get the string representation of this VMID.