java.rmi.dgc

Class VMID

Implemented Interfaces:
Serializable

public final class VMID
extends Object
implements Serializable

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.
See Also:
Serialized Form

Constructor Summary

VMID()
Create a new VMID.

Method Summary

static @Deprecated
boolean isUnique()
Deprecated.
boolean
equals(Object obj)
Compare this VMID to another, and return true if they are the same identifier.
int
hashCode()
Compute hash code for this VMID.
String
toString()
Return string representation of this VMID.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

VMID

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.

Usages and Demos :

View More Examples of VMID()
   1:     public static void main(String[] args) {
   2:         String vmid = new VMID().toString();
   3:         System.out.println( vmid );
   4:     }
   5:     

View Full Code Here
   1:     static {
   2:         long t = new java.rmi.dgc.VMID().hashCode();
   3:         base = ~(3L << 62) & (t << 32);
   4:     }

View Full Code Here
   1: {
   2:     protected static VMID vmid = new VMID();

View Full Code Here
   1: 
   2:     protected static VMID vmid = new VMID();

View Full Code Here
   1: {
   2:     protected static VMID vmid = new VMID();

View Full Code Here

Method Details

boolean isUnique

public static @Deprecated 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:
true if host address can be determined, false otherwise

equals

public boolean equals(Object obj)
Compare this VMID to another, and return true if they are the same identifier.
Overrides:
equals in interface Object
Usages and Demos :

View More Examples of equals(Object obj)
   1: 
   2: import java.rmi.dgc.VMID;
   3: 
   4:         ...
   5: 
   6:   VMID vmid;
   7: 
   8:         ...
   9:       Connectable connectable = (Connectable)obj;
  10:       return vmid.equals(connectable.getVMID()) && clientHost.equals(connectable.getClientHost());
  11:     }

View Full Code Here
   1: 
   2: import java.rmi.dgc.VMID;
   3: public class Connectablestyle implements java.io.Serializable {
   4:         ...
   5: 
   6:   VMID vmid;
   7: 
   8:         ...
   9:       Connectablestyle connectable = (Connectablestyle)obj;
  10:       return vmid.equals(connectable.getVMID()) && clientHost.equals(connectable.getClientHost());
  11:     }

View Full Code Here

hashCode

public int hashCode()
Compute hash code for this VMID.
Overrides:
hashCode in interface Object
Usages and Demos :

View More Examples of hashCode()
   1: 
   2: import java.rmi.dgc.VMID;
   3: 
   4:         ...
   5: 
   6:   VMID vmid;
   7: 
   8:         ...
   9:   public int hashCode() {
  10:     return vmid.hashCode();
  11:   }

View Full Code Here
   1: 
   2: import java.rmi.dgc.VMID;
   3: public class Connectablestyle implements java.io.Serializable {
   4:         ...
   5: 
   6:   VMID vmid;
   7: 
   8:         ...
   9:   public int hashCode() {
  10:     return vmid.hashCode();
  11:   }

View Full Code Here

toString

public String toString()
Return string representation of this VMID.
Overrides:
toString in interface Object