Package com.alibaba.ttl
Class TtlRecursiveAction
- java.lang.Object
-
- java.util.concurrent.ForkJoinTask<Void>
-
- com.alibaba.ttl.TtlRecursiveAction
-
- All Implemented Interfaces:
TtlEnhanced,Serializable,Future<Void>
public abstract class TtlRecursiveAction extends ForkJoinTask<Void> implements TtlEnhanced
A recursive resultlessForkJoinTaskenhanced byTransmittableThreadLocal.Recommend to use
TtlAgent; Specially forJava 8StreamandCompletableFuture, these async task are executed byForkJoinPoolviaForkJoinTaskat the bottom.- Since:
- 2.4.0
- Author:
- LNAmp
- See Also:
RecursiveAction,TtlForkJoinPoolHelper,TtlAgent, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTtlRecursiveAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcompute()The main computation performed by this task.protected booleanexec()Implements execution conventions for RecursiveActions.VoidgetRawResult()protected 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
-
-
-
-
Method Detail
-
compute
protected abstract void compute()
The main computation performed by this task.
-
getRawResult
public final Void getRawResult()
- Specified by:
getRawResultin classForkJoinTask<Void>
-
setRawResult
protected final void setRawResult(Void mustBeNull)
- Specified by:
setRawResultin classForkJoinTask<Void>
-
exec
protected final boolean exec()
Implements execution conventions for RecursiveActions.- Specified by:
execin classForkJoinTask<Void>
-
-