Class TimeoutGuardTask
java.lang.Object
org.hawaiiframework.async.HawaiiAsyncRunnable
org.hawaiiframework.async.timeout.TimeoutGuardTask
- All Implemented Interfaces:
Runnable
Task that stops another scheduled task if the scheduled task's timeout has been reached.
We first try to remove the scheduled task from the executor, so it will not be executed. If this fails we will try to abort the scheduled tasks.
For this the guarded task must register it's TaskAbortStrategy in the SharedTaskContext.
- Since:
- 2.0.0
-
Field Summary
Fields inherited from class org.hawaiiframework.async.HawaiiAsyncRunnable
sharedTaskContext -
Constructor Summary
ConstructorsConstructorDescriptionTimeoutGuardTask(SharedTaskContext sharedTaskContext) Create a newTimeoutGuardTaskinstance with the giventaskExecutor. -
Method Summary
Methods inherited from class org.hawaiiframework.async.HawaiiAsyncRunnable
run
-
Constructor Details
-
Method Details
-
doRun
protected void doRun()Description copied from class:HawaiiAsyncRunnableThis method is executed byRunnablerun. Run executes all administrative calls. Code specified in this method will be executed in between those calls.- Specified by:
doRunin classHawaiiAsyncRunnable
-