|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.plan.ParallelCollectorGroup
public class ParallelCollectorGroup
This class represents a pool of collector contexts that can be triggered to perform collection activity.
| Field Summary | |
|---|---|
private boolean |
aborted
Is there an abort request outstanding? |
private ParallelCollector[] |
contexts
The collector context instances operating within this group |
private int |
contextsParked
The number of threads that are currently parked |
private int |
currentRendezvousCounter
Which rendezvous counter is currently in use |
private Monitor |
lock
Lock used to manage group state. |
private String |
name
The name of this collector context group. |
private int[] |
rendezvousCounter
Used to count threads during calls to rendezvous() |
private int |
triggerCount
The number of cycles triggered |
| Constructor Summary | |
|---|---|
ParallelCollectorGroup(String name)
Initialization |
|
| Method Summary | |
|---|---|
void |
abortCycle()
Signal that you would like the threads to park abruptly. |
int |
activeWorkerCount()
|
void |
initGroup(int size,
Class<? extends ParallelCollector> klass)
Initialize the collector context group. |
boolean |
isAborted()
Has the cycle been aborted? |
boolean |
isMember(CollectorContext context)
Is the given context and member of this group. |
void |
park(ParallelCollector context)
Park the given collector in the group. |
int |
rendezvous()
Rendezvous with other active threads in this group. |
void |
triggerCycle()
Wake up the parked threads in this group. |
void |
waitForCycle()
Wait until the group is idle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final String name
private ParallelCollector[] contexts
private Monitor lock
private volatile int triggerCount
private volatile int contextsParked
private volatile boolean aborted
private int[] rendezvousCounter
private volatile int currentRendezvousCounter
| Constructor Detail |
|---|
public ParallelCollectorGroup(String name)
| Method Detail |
|---|
public int activeWorkerCount()
public void initGroup(int size,
Class<? extends ParallelCollector> klass)
size - The number of collector contexts within the group.klass - The type of collector context to create.public void triggerCycle()
public void abortCycle()
public boolean isAborted()
public void waitForCycle()
public void park(ParallelCollector context)
context - The context to park.public boolean isMember(CollectorContext context)
context - The context to pass.
true if the context is a member.public int rendezvous()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||