Package com.alibaba.ttl
Class TtlRecursiveAction
- All Implemented Interfaces:
TtlEnhanced,Serializable,Future<Void>
A recursive resultless
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
Modifier and TypeMethodDescriptionprotected abstract voidcompute()The main computation performed by this task.protected final booleanexec()Implements execution conventions for RecursiveActions.final Voidprotected final voidsetRawResult(Void mustBeNull) 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
-
TtlRecursiveAction
protected TtlRecursiveAction()
-
-
Method Details
-
compute
protected abstract void compute()The main computation performed by this task. -
getRawResult
- Specified by:
getRawResultin classForkJoinTask<Void>
-
setRawResult
- Specified by:
setRawResultin classForkJoinTask<Void>
-
exec
protected final boolean exec()Implements execution conventions for RecursiveActions.- Specified by:
execin classForkJoinTask<Void>
-