static final class ForkJoinTask.AdaptedCallable<T> extends ForkJoinTask<T> implements java.util.concurrent.RunnableFuture<T>
ForkJoinTask.AdaptedCallable<T>, ForkJoinTask.AdaptedRunnable<T>, ForkJoinTask.AdaptedRunnableAction, ForkJoinTask.ExceptionNode
Modifier and Type | Field and Description |
---|---|
(package private) java.util.concurrent.Callable<? extends T> |
callable |
(package private) T |
result |
private static long |
serialVersionUID |
CANCELLED, DONE_MASK, EXCEPTIONAL, NORMAL, SIGNAL, SMASK, status
Constructor and Description |
---|
ForkJoinTask.AdaptedCallable(java.util.concurrent.Callable<? extends T> callable) |
Modifier and Type | Method and Description |
---|---|
boolean |
exec()
Immediately performs the base action of this task and returns
true if, upon return from this method, this task is guaranteed
to have completed normally.
|
T |
getRawResult()
Returns the result that would be returned by
ForkJoinTask.join() , even
if this task completed abnormally, or null if this task
is not known to have been completed. |
void |
run() |
void |
setRawResult(T v)
Forces the given value to be returned as a result.
|
adapt, adapt, adapt, cancel, cancelIgnoringExceptions, compareAndSetForkJoinTaskTag, complete, completeExceptionally, doExec, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpExpungeStaleExceptions, helpQuiesce, inForkJoinPool, internalPropagateException, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, recordExceptionalCompletion, reinitialize, rethrow, setForkJoinTaskTag, trySetSignal, tryUnfork, uncheckedThrow
final java.util.concurrent.Callable<? extends T> callable
T result
private static final long serialVersionUID
ForkJoinTask.AdaptedCallable(java.util.concurrent.Callable<? extends T> callable)
public final T getRawResult()
ForkJoinTask
ForkJoinTask.join()
, even
if this task completed abnormally, or null
if this task
is not known to have been completed. This method is designed
to aid debugging, as well as to support extensions. Its use in
any other context is discouraged.getRawResult
in class ForkJoinTask<T>
null
if not completedpublic final void setRawResult(T v)
ForkJoinTask
setRawResult
in class ForkJoinTask<T>
v
- the valuepublic final boolean exec()
ForkJoinTask
exec
in class ForkJoinTask<T>
true
if this task is known to have completed normallypublic final void run()
run
in interface java.lang.Runnable
run
in interface java.util.concurrent.RunnableFuture<T>