public class ControllerCollectorContext extends CollectorContext
Modifier and Type | Field and Description |
---|---|
private boolean |
concurrentCollection
Is there concurrent collection activity
|
private int |
lastRequestCount
The request index that was last completed
|
private Monitor |
lock
The lock to use to manage collection
|
private int |
requestCount
The current request index
|
private boolean |
requestFlag
Flag used to control the 'race to request'
|
private ParallelCollectorGroup |
workers
The set of worker threads to use
|
log
Constructor and Description |
---|
ControllerCollectorContext(ParallelCollectorGroup workers)
Create a controller context.
|
Modifier and Type | Method and Description |
---|---|
private void |
clearRequest()
Clear the collection request, making future requests incur an
additional collection cycle.
|
void |
initCollector(int id)
Notify that the collector context is registered and ready to execute.
|
void |
request()
Request a collection.
|
void |
requestConcurrentCollection()
Request that concurrent collection is performed after this stop-the-world increment.
|
void |
run()
Main execution loop.
|
private void |
waitForRequest()
Wait until a request is received.
|
allocCopy, copyCheckAllocator, getId, getLog, parallelWorkerCount, parallelWorkerOrdinal, postCopy, rendezvous
private final ParallelCollectorGroup workers
private boolean requestFlag
private int requestCount
private int lastRequestCount
private boolean concurrentCollection
public ControllerCollectorContext(ParallelCollectorGroup workers)
workers
- The worker group to use for collection.public void initCollector(int id)
CollectorContext
initCollector
in class CollectorContext
id
- The id of this collector context.public void run()
run
in class CollectorContext
public void requestConcurrentCollection()
public void request()
private void clearRequest()
private void waitForRequest()