org.jikesrvm.mm.mmtk
Class ActivePlan

java.lang.Object
  extended by org.mmtk.vm.ActivePlan
      extended by org.jikesrvm.mm.mmtk.ActivePlan

public final class ActivePlan
extends ActivePlan

This class contains interfaces to access the current plan, plan local and plan constraints instances.


Field Summary
private static int collectorCount
           
private static Selected.Collector[] collectors
           
private static int MAX_CONTEXTS
           
private static int mutatorCount
           
private static SynchronizedCounter mutatorCounter
           
private static Selected.Mutator[] mutators
           
 
Constructor Summary
ActivePlan()
           
 
Method Summary
 CollectorContext collector()
           
 CollectorContext collector(int id)
          Return the CollectorContext instance given its unique identifier.
 int collectorCount()
           
 PlanConstraints constraints()
           
static void flushRememberedSets()
          Flush the mutator remembered sets (if any) for this active plan
 MutatorContext getNextMutator()
          Return the next MutatorContext in a synchronized iteration of all mutators.
 Plan global()
           
 Log log()
           
 MutatorContext mutator()
           
 MutatorContext mutator(int id)
          Return the MutatorContext instance given its unique identifier.
 int mutatorCount()
           
 int registerCollector(CollectorContext collector)
          Register a new CollectorContext instance.
 int registerMutator(MutatorContext mutator)
          Register a new MutatorContext instance.
 void resetMutatorIterator()
          Reset the mutator iterator
 Selected.Collector selectedCollector(int id)
          Return the Selected.Collector instance given its unique identifier.
 Selected.Mutator selectedMutator(int id)
          Return the Selected.Mutator instance given its unique identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_CONTEXTS

private static final int MAX_CONTEXTS
See Also:
Constant Field Values

collectors

private static Selected.Collector[] collectors

collectorCount

private static int collectorCount

mutators

private static Selected.Mutator[] mutators

mutatorCount

private static int mutatorCount

mutatorCounter

private static SynchronizedCounter mutatorCounter
Constructor Detail

ActivePlan

public ActivePlan()
Method Detail

global

public Plan global()
Specified by:
global in class ActivePlan
Returns:
The active Plan instance.

constraints

public PlanConstraints constraints()
Specified by:
constraints in class ActivePlan
Returns:
The active PlanConstraints instance.

collector

public CollectorContext collector()
Specified by:
collector in class ActivePlan
Returns:
The active CollectorContext instance.

mutator

public MutatorContext mutator()
Specified by:
mutator in class ActivePlan
Returns:
The active MutatorContext instance.

log

public Log log()
Specified by:
log in class ActivePlan
Returns:
The log for the active thread

flushRememberedSets

public static void flushRememberedSets()
Flush the mutator remembered sets (if any) for this active plan


collector

public CollectorContext collector(int id)
Return the CollectorContext instance given its unique identifier.

Specified by:
collector in class ActivePlan
Parameters:
id - The identifier of the CollectorContext to return
Returns:
The specified CollectorContext

mutator

public MutatorContext mutator(int id)
Return the MutatorContext instance given its unique identifier.

Specified by:
mutator in class ActivePlan
Parameters:
id - The identifier of the MutatorContext to return
Returns:
The specified MutatorContext

selectedCollector

public Selected.Collector selectedCollector(int id)
Return the Selected.Collector instance given its unique identifier.

Parameters:
id - The identifier of the Selected.Collector to return
Returns:
The specified Selected.Collector

selectedMutator

public Selected.Mutator selectedMutator(int id)
Return the Selected.Mutator instance given its unique identifier.

Parameters:
id - The identifier of the Selected.Mutator to return
Returns:
The specified Selected.Mutator

collectorCount

public int collectorCount()
Specified by:
collectorCount in class ActivePlan
Returns:
The number of registered CollectorContext instances.

mutatorCount

public int mutatorCount()
Specified by:
mutatorCount in class ActivePlan
Returns:
The number of registered MutatorContext instances.

resetMutatorIterator

public void resetMutatorIterator()
Reset the mutator iterator

Specified by:
resetMutatorIterator in class ActivePlan

getNextMutator

public MutatorContext getNextMutator()
Return the next MutatorContext in a synchronized iteration of all mutators.

Specified by:
getNextMutator in class ActivePlan
Returns:
The next MutatorContext in a synchronized iteration of all mutators, or null when all mutators have been done.

registerCollector

public int registerCollector(CollectorContext collector)
Register a new CollectorContext instance.

Specified by:
registerCollector in class ActivePlan
Parameters:
collector - The CollectorContext to register
Returns:
The CollectorContext's unique identifier

registerMutator

public int registerMutator(MutatorContext mutator)
Register a new MutatorContext instance.

Specified by:
registerMutator in class ActivePlan
Parameters:
mutator - The MutatorContext to register
Returns:
The MutatorContext's unique identifier