Package com.alibaba.ttl
Class TtlRecursiveTask<V>
java.lang.Object
java.util.concurrent.ForkJoinTask<V>
com.alibaba.ttl.TtlRecursiveTask<V>
- All Implemented Interfaces:
TtlEnhanced,Serializable,Future<V>
A recursive result-bearing
ForkJoinTask enhanced by TransmittableThreadLocal.
Recommend to use TtlAgent;
Specially for Java 8 Stream and CompletableFuture,
these async task are executed by ForkJoinPool via ForkJoinTask at the bottom.
- Since:
- 2.4.0
- Author:
- LNAmp
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollSubmission, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
-
Constructor Details
-
TtlRecursiveTask
protected TtlRecursiveTask()
-
-
Method Details
-
compute
The main computation performed by this task.- Returns:
- the result of the computation
-
getRawResult
- Specified by:
getRawResultin classForkJoinTask<V>
-
setRawResult
- Specified by:
setRawResultin classForkJoinTask<V>
-
exec
protected final boolean exec()Implements execution conventions for RecursiveTask.- Specified by:
execin classForkJoinTask<V>
-