Book Home Java Enterprise in a Nutshell Search this book

Chapter 15. The java.rmi.dgc Package

The java.rmi.dgc package contains an interface and two classes that support distributed garbage collection in RMI. Distributed garbage collection is normally handled automatically by the RMI system, so most applications do not need to use this package. Figure 15-1 shows the class hierarchy for this package.

figure

Figure 15-1. The java.dgc.activation package

DGCJava 1.1
java.rmi.dgcremote PJ1.1(opt)

This interface provides an abstraction for the server side of distributed garbage collection, using the notion of dirty and clean calls.

public abstract interface DGC extends Remote {
// Public Instance Methods
public abstract void clean (java.rmi.server.ObjID[ ] ids, long sequenceNum, VMID vmid, boolean strong) throws RemoteException;
public abstract Lease dirty (java.rmi.server.ObjID[ ] ids, long sequenceNum, Lease lease) throws RemoteException;
}

Hierarchy: (DGC(Remote))

LeaseJava 1.1
java.rmi.dgcserializable PJ1.1(opt)

This class encapsulates a unique virtual machine identifier and a lease duration that manages garbage collection of distributed objects.

public final class Lease implements Serializable {
// Public Constructors
public Lease (VMID id, long duration);
// Public Instance Methods
public long getValue ();
public VMID getVMID ();
}

Hierarchy: Object-->Lease(Serializable)

Passed To: DGC.dirty()

Returned By: DGC.dirty()

VMIDJava 1.1
java.rmi.dgcserializable PJ1.1(opt)

This class represents a virtual machine identifier that is unique across all Java virtual machines.

public final class VMID implements Serializable {
// Public Constructors
public VMID ();
// Public Class Methods
public static boolean isUnique (); constant
// Public methods overriding Object
public boolean equals (Object obj);
public int hashCode ();
public String toString ();
}

Hierarchy: Object-->VMID(Serializable)

Passed To: DGC.clean(), Lease.Lease()

Returned By: Lease.getVMID()



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.