|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsr166y.ForkJoinTask<V> jsr166y.RecursiveTask<T> groovyx.gpars.forkjoin.AbstractForkJoinWorker<T>
public abstract class AbstractForkJoinWorker<T>
Implements the ForkJoin worker contract. Subclasses need to implement the compute() to perform the actual Fork/Join algorithm leveraging the options provided by the AbstractForkJoinWorker class. The AbstractForJoinWorker class takes care of the child sub-processes.
Author: Vaclav Pech Date: Nov 1, 2009
Field Summary | |
---|---|
private java.util.List<AbstractForkJoinWorker<T>> |
children
Stores the child workers |
Constructor Summary | |
---|---|
protected |
AbstractForkJoinWorker()
|
Method Summary | |
---|---|
protected T |
compute()
|
protected abstract T |
computeTask()
|
protected void |
forkOffChild(AbstractForkJoinWorker<T> child)
Forks a child task. |
java.util.List<T> |
getChildrenResults()
Waits for and returns the results of the child tasks. |
Methods inherited from class jsr166y.RecursiveTask |
---|
exec, getRawResult, setRawResult |
Methods inherited from class jsr166y.ForkJoinTask |
---|
adapt, adapt, adapt, cancel, complete, completeExceptionally, fork, get, get, getException, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyInvoke, quietlyJoin, reinitialize, tryUnfork |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.List<AbstractForkJoinWorker<T>> children
Constructor Detail |
---|
protected AbstractForkJoinWorker()
Method Detail |
---|
protected final T compute()
compute
in class jsr166y.RecursiveTask<T>
protected abstract T computeTask()
protected final void forkOffChild(AbstractForkJoinWorker<T> child)
child
- The child taskpublic final java.util.List<T> getChildrenResults()
|
Copyright © 2008–2012 Václav Pech. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |