Class TimeoutGuardTask
- java.lang.Object
-
- org.hawaiiframework.async.timeout.TimeoutGuardTask
-
- All Implemented Interfaces:
Runnable
public class TimeoutGuardTask extends Object implements 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 theSharedTaskContext
.- Since:
- 2.0.0
- Author:
- Rutger Lubbers, Paul Klos
-
-
Constructor Summary
Constructors Constructor Description TimeoutGuardTask(@NotNull MdcContext mdcContext, SharedTaskContext sharedTaskContext)
-
-
-
Constructor Detail
-
TimeoutGuardTask
public TimeoutGuardTask(@NotNull @NotNull MdcContext mdcContext, SharedTaskContext sharedTaskContext)
- Parameters:
mdcContext
- The Logging context to set
-
-