APIdia Launch Partner
Top Description Fields Constructors Methods
java.rmi.dgc

public final Class VMID

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.rmi.server.UID, java.security.SecureRandom

A VMID is a identifier that is unique across all Java virtual machines. VMIDs are used by the distributed garbage collector to identify client VMs.
Authors
Ann Wollrath, Peter Jones

Field Summary

Modifier and TypeField and Description
private byte[]
private static final byte[]
randomBytes

Array of bytes uniquely identifying this host

private static final long
serialVersionUID

indicate compatibility with JDK 1.1.x version of class

private UID

Constructor Summary

AccessConstructor and Description
public
VMID()

Create a new VMID.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Compare this VMID to another, and return true if they are the same identifier.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Compute hash code for this VMID.

public static boolean

Returns:

true if host address can be determined, false otherwise
isUnique
()
Deprecated

Return true if an accurate address can be determined for this host.

public String
toString()

Overrides java.lang.Object.toString.

Return string representation of this VMID.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

addrback to summary
private byte[] addr
randomBytesback to summary
private static final byte[] randomBytes

Array of bytes uniquely identifying this host

serialVersionUIDback to summary
private static final long serialVersionUID

indicate compatibility with JDK 1.1.x version of class

uidback to summary
private UID uid

Constructor Detail

VMIDback to summary
public VMID()

Create a new VMID. Each new VMID returned from this constructor is unique for all Java virtual machines under the following conditions: a) the conditions for uniqueness for objects of the class java.rmi.server.UID are satisfied, and b) an address can be obtained for this host that is unique and constant for the lifetime of this object.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Compare this VMID to another, and return true if they are the same identifier.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Compute hash code for this VMID.

isUniqueback to summary
public static boolean isUnique()

Deprecated

Return true if an accurate address can be determined for this host. If false, reliable VMID cannot be generated from this host

Returns:boolean

true if host address can be determined, false otherwise

Annotations
@Deprecated
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return string representation of this VMID.