org.mmtk.plan
Class TraceWriteBuffer

java.lang.Object
  extended by org.mmtk.plan.TransitiveClosure
      extended by org.mmtk.plan.TraceWriteBuffer

public final class TraceWriteBuffer
extends TransitiveClosure

This class is used to push values in one direction during a trace. It was designed for use in mutators that use write barriers to push work to collector threads during concurrent tracing.

See Also:
TraceLocal

Field Summary
private  WriteBuffer buffer
           
 
Fields inherited from class org.mmtk.plan.TransitiveClosure
specializedScan
 
Constructor Summary
TraceWriteBuffer(Trace trace)
          Constructor
 
Method Summary
 void flush()
          Flush the buffer to the trace.
 boolean isFlushed()
           
 void processNode(ObjectReference object)
          Enqueue an object during a trace.
 
Methods inherited from class org.mmtk.plan.TransitiveClosure
getSpecializedScanClass, processEdge, registerSpecializedScan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private final WriteBuffer buffer
Constructor Detail

TraceWriteBuffer

public TraceWriteBuffer(Trace trace)
Constructor

Parameters:
trace - The global trace class to use.
Method Detail

flush

public void flush()
Flush the buffer to the trace.


isFlushed

public boolean isFlushed()
Returns:
true if the buffer is flushed.

processNode

public void processNode(ObjectReference object)
Enqueue an object during a trace.

Overrides:
processNode in class TransitiveClosure
Parameters:
object - The object to enqueue