R
- Return type for this future.public static final class BaseTask.FutureTask<R> extends BaseTask
BaseTask.FinishTask, BaseTask.FutureTask<R>
Modifier and Type | Field and Description |
---|---|
protected static java.util.concurrent.atomic.AtomicLong |
TASK_COUNTER
Count all asynchronous tasks.
|
Constructor and Description |
---|
FutureTask(java.util.concurrent.Callable<R> setRunnable,
BaseTask.FinishTask setImmediatelyEnclosingFinish,
boolean rethrowException)
Constructor for FutureTask.
|
Modifier and Type | Method and Description |
---|---|
void |
compute() |
java.util.concurrent.CompletableFuture<R> |
future()
Get the future container associated with this task.
|
BaseTask.FinishTask |
ief()
Fetch the immediately enclosing finish of a task.
|
addToPendingCount, compareAndSetPendingCount, complete, decrementPendingCountUnlessZero, exec, firstComplete, getCompleter, getPendingCount, getRawResult, getRoot, helpComplete, nextComplete, onCompletion, onExceptionalCompletion, propagateCompletion, quietlyCompleteRoot, setPendingCount, setRawResult, tryComplete
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, 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
protected static final java.util.concurrent.atomic.AtomicLong TASK_COUNTER
public FutureTask(java.util.concurrent.Callable<R> setRunnable, BaseTask.FinishTask setImmediatelyEnclosingFinish, boolean rethrowException)
setRunnable
- User-defined body of this task.setImmediatelyEnclosingFinish
- Finish scope for this task.rethrowException
- Whether to respond to caught exceptions by
re-throwing.public void compute()
compute
in class java.util.concurrent.CountedCompleter<java.lang.Void>
public BaseTask.FinishTask ief()
BaseTask
public java.util.concurrent.CompletableFuture<R> future()