Uses of Class
java.util.concurrent.ForkJoinTask
-
Packages that use ForkJoinTask Package Description java.util.concurrent Utility classes commonly useful in concurrent programming. -
-
Uses of ForkJoinTask in java.util.concurrent
Subclasses of ForkJoinTask in java.util.concurrent Modifier and Type Class and Description class
CountedCompleter<T>
AForkJoinTask
with a completion action performed when triggered and there are no remaining pending actions.class
RecursiveAction
A recursive resultlessForkJoinTask
.class
RecursiveTask<V>
A recursive result-bearingForkJoinTask
.Methods in java.util.concurrent with type parameters of type ForkJoinTask Modifier and Type Method and Description static <T extends ForkJoinTask<?>>
Collection<T>ForkJoinTask. invokeAll(Collection<T> tasks)
Forks all tasks in the specified collection, returning whenisDone
holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown.Methods in java.util.concurrent that return ForkJoinTask Modifier and Type Method and Description static <T> ForkJoinTask<T>
ForkJoinTask. adapt(Callable<? extends T> callable)
Returns a newForkJoinTask
that performs thecall
method of the givenCallable
as its action, and returns its result uponjoin()
, translating any checked exceptions encountered intoRuntimeException
.static ForkJoinTask<?>
ForkJoinTask. adapt(Runnable runnable)
Returns a newForkJoinTask
that performs therun
method of the givenRunnable
as its action, and returns a null result uponjoin()
.static <T> ForkJoinTask<T>
ForkJoinTask. adapt(Runnable runnable, T result)
Returns a newForkJoinTask
that performs therun
method of the givenRunnable
as its action, and returns the given result uponjoin()
.ForkJoinTask<V>
ForkJoinTask. fork()
Arranges to asynchronously execute this task in the pool the current task is running in, if applicable, or using theForkJoinPool.commonPool()
if notinForkJoinPool()
.protected static ForkJoinTask<?>
ForkJoinTask. peekNextLocalTask()
Returns, but does not unschedule or execute, a task queued by the current thread but not yet executed, if one is immediately available.protected static ForkJoinTask<?>
ForkJoinTask. pollNextLocalTask()
Unschedules and returns, without executing, the next task queued by the current thread but not yet executed, if the current thread is operating in a ForkJoinPool.protected ForkJoinTask<?>
ForkJoinPool. pollSubmission()
Removes and returns the next unexecuted submission if one is available.protected static ForkJoinTask<?>
ForkJoinTask. pollTask()
If the current thread is operating in a ForkJoinPool, unschedules and returns, without executing, the next task queued by the current thread but not yet executed, if one is available, or if not available, a task that was forked by some other thread, if available.<T> ForkJoinTask<T>
ForkJoinPool. submit(Callable<T> task)
<T> ForkJoinTask<T>
ForkJoinPool. submit(ForkJoinTask<T> task)
Submits a ForkJoinTask for execution.ForkJoinTask<?>
ForkJoinPool. submit(Runnable task)
<T> ForkJoinTask<T>
ForkJoinPool. submit(Runnable task, T result)
Methods in java.util.concurrent with parameters of type ForkJoinTask Modifier and Type Method and Description void
ForkJoinPool. execute(ForkJoinTask<?> task)
Arranges for (asynchronous) execution of the given task.<T> T
ForkJoinPool. invoke(ForkJoinTask<T> task)
Performs the given task, returning its result upon completion.static void
ForkJoinTask. invokeAll(ForkJoinTask<?>... tasks)
Forks the given tasks, returning whenisDone
holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown.static void
ForkJoinTask. invokeAll(ForkJoinTask<?> t1, ForkJoinTask<?> t2)
Forks the given tasks, returning whenisDone
holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown.static void
ForkJoinTask. invokeAll(ForkJoinTask<?> t1, ForkJoinTask<?> t2)
Forks the given tasks, returning whenisDone
holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown.<T> ForkJoinTask<T>
ForkJoinPool. submit(ForkJoinTask<T> task)
Submits a ForkJoinTask for execution.Method parameters in java.util.concurrent with type arguments of type ForkJoinTask Modifier and Type Method and Description protected int
ForkJoinPool. drainTasksTo(Collection<? super ForkJoinTask<?>> c)
Removes all available unexecuted submitted and forked tasks from scheduling queues and adds them to the given collection, without altering their execution status.
-
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.