org.mmtk.vm
Class ReferenceProcessor

java.lang.Object
  extended by org.mmtk.vm.ReferenceProcessor
Direct Known Subclasses:
ReferenceProcessor

public abstract class ReferenceProcessor
extends Object

This class manages SoftReferences, WeakReferences, and PhantomReferences.


Nested Class Summary
static class ReferenceProcessor.Semantics
           
 
Constructor Summary
ReferenceProcessor()
           
 
Method Summary
abstract  void clear()
          Clear the contents of the table.
abstract  int countWaitingReferences()
           
abstract  void forward(TraceLocal trace, boolean nursery)
          Iterate over all references and forward.
abstract  void scan(TraceLocal trace, boolean nursery)
          Scan through the list of references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceProcessor

public ReferenceProcessor()
Method Detail

clear

public abstract void clear()
Clear the contents of the table. This is called when reference types are disabled to make it easier for VMs to change this setting at runtime.


scan

public abstract void scan(TraceLocal trace,
                          boolean nursery)
Scan through the list of references.

Parameters:
trace - the thread local trace element.
nursery - true if it is safe to only scan new references.

forward

public abstract void forward(TraceLocal trace,
                             boolean nursery)
Iterate over all references and forward.

Parameters:
trace - The MMTk trace to forward to
nursery - The nursery collection hint

countWaitingReferences

public abstract int countWaitingReferences()
Returns:
the number of references objects on the queue