public class TaskGroup
extends java.util.concurrent.RecursiveAction
A group of tasks to be executed in a fork-join tree.
Constructor and Description |
---|
TaskGroup(boolean par)
Create a new task group.
|
Modifier and Type | Method and Description |
---|---|
void |
addTask(java.util.concurrent.ForkJoinTask<?> task)
Add a task to be executed.
|
void |
compute() |
boolean |
getContinueAfterError() |
boolean |
isParallel()
Query whether the subtasks will be run in parallel.
|
void |
setContinueAterError(boolean c) |
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
public TaskGroup(boolean par)
Create a new task group.
par
- true
to execute the subtasks in parallel.public boolean isParallel()
Query whether the subtasks will be run in parallel.
true
if the subtasks are run in parallel.public void setContinueAterError(boolean c)
public boolean getContinueAfterError()
public void addTask(java.util.concurrent.ForkJoinTask<?> task)
Add a task to be executed.
task
- The task to execute.public void compute()
compute
in class java.util.concurrent.RecursiveAction