uka.karmi.rmi
Class DGC

java.lang.Object
  extended byuka.karmi.rmi.DGC
Direct Known Subclasses:
HierarchicalDGC, NoDGC

public abstract class DGC
extends java.lang.Object

Base class for distributed garbage collectors. Different distributed garbage collector algorithms can be used in KaRMI. All garbage collectors in KaRMI must implement the DGC interface in order to interact with the rest of the runtime system. DGC algorithms return appropriate DGCMarshalContext/DGCUnmarshalContext objects through the two factory methods.

A DGC object can communicate with DGC objects in other address spaces via a technology and a UTID. Technology.dgcCall() and Technology.asyncDgcCall() are used for this kind of communication. On the remote DGC object doDGCCall or doAsyncDgcCall is called. This mechanism is similar to the normal remote method invocation with the difference that no remote references are allowed in the argument and return value.

Author:
Christian Nester, Bernhard Haumacher

Constructor Summary
DGC()
           
 
Method Summary
abstract  void doAsyncDGCCall(ExportPoint ep, int customId, java.lang.Object argument)
          Caller does not wait for the end of the call.
abstract  java.lang.Object doDGCCall(ExportPoint ep, int customId, java.lang.Object argument)
          Called from a different address space.
abstract  DGCMarshalContext newDGCMarshalContext()
          Factory method to create DGCMarshalContext object for this DGC
abstract  DGCUnmarshalContext newDGCUnmarshalContext()
          Factory method to create DGCUnmarshalContext object for this DGC
abstract  void remoteFinalize(ObjectId dgcId, java.lang.Object dgcInfo)
          Called during the finalization of a SingleRemoteClientRef object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DGC

public DGC()
Method Detail

remoteFinalize

public abstract void remoteFinalize(ObjectId dgcId,
                                    java.lang.Object dgcInfo)
Called during the finalization of a SingleRemoteClientRef object.

See Also:
SingleRemoteClientRef.finalize()

newDGCUnmarshalContext

public abstract DGCUnmarshalContext newDGCUnmarshalContext()
Factory method to create DGCUnmarshalContext object for this DGC


newDGCMarshalContext

public abstract DGCMarshalContext newDGCMarshalContext()
Factory method to create DGCMarshalContext object for this DGC


doDGCCall

public abstract java.lang.Object doDGCCall(ExportPoint ep,
                                           int customId,
                                           java.lang.Object argument)
                                    throws java.lang.Throwable
Called from a different address space. Remote references are not allowed neither in the argument object nor in the result!

Throws:
java.lang.Throwable
See Also:
Technology.dgcCall(UTID utid, int methodId, Object argument)

doAsyncDGCCall

public abstract void doAsyncDGCCall(ExportPoint ep,
                                    int customId,
                                    java.lang.Object argument)
                             throws java.lang.Throwable
Caller does not wait for the end of the call.

Throws:
java.lang.Throwable
See Also:
doDGCCall(ExportPoint, int, Object)