|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ForkJoinExecutor
An object that executes ForkJoinTask
computations. This
interface does not expose lifecycle, status, or management methods
corresponding to implementations, so may be useful as a basis
for classes that must restrict access to such methods.
Method Summary | ||
---|---|---|
|
execute(ForkJoinTask<T> task)
Arranges for (asynchronous) execution of the given task. |
|
int |
getParallelismLevel()
Returns an estimate of how many tasks (including subtasks) may execute at once. |
|
|
invoke(ForkJoinTask<T> task)
Performs the given task; returning its result upon completion |
|
|
submit(ForkJoinTask<T> task)
Arranges for (asynchronous) execution of the given task, returning a Future that may be used to obtain results upon completion. |
Method Detail |
---|
<T> void execute(ForkJoinTask<T> task)
task
- the task
java.lang.NullPointerException
- if task is null
java.util.concurrent.RejectedExecutionException
- if the executor is
not in a state that allows execution.<T> T invoke(ForkJoinTask<T> task)
task
- the task
java.lang.NullPointerException
- if task is null
java.util.concurrent.RejectedExecutionException
- if the executor is
not in a state that allows execution.<T> java.util.concurrent.Future<T> submit(ForkJoinTask<T> task)
task
- the task
java.lang.NullPointerException
- if task is null
java.util.concurrent.RejectedExecutionException
- if the executor is
not in a state that allows execution.int getParallelismLevel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |