Example usage for Java java.util.concurrent ForkJoinTask fields, constructors, methods, implement or subclass
The text is from its open source code.
ForkJoinTask> | adapt(Runnable runnable) Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns a null result upon #join . |
ForkJoinTask | adapt(Callable extends T> callable) Returns a new ForkJoinTask that performs the call method of the given Callable as its action, and returns its result upon #join , translating any checked exceptions encountered into RuntimeException . |
boolean | cancel(boolean mayInterruptIfRunning) Attempts to cancel execution of this task. |
V | get(long timeout, TimeUnit unit) Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
V | get() Waits if necessary for the computation to complete, and then retrieves its result. |
void | helpQuiesce() Possibly executes tasks until the pool hosting the current task ForkJoinPool#isQuiescent is quiescent . |
void | invokeAll(ForkJoinTask> t1, ForkJoinTask> t2) Forks the given tasks, returning when isDone holds for each task or an (unchecked) exception is encountered, in which case the exception is rethrown. |
boolean | isCompletedAbnormally() Returns true if this task threw an exception or was cancelled. |
V | join() Returns the result of the computation when it #isDone is done . |