Class TaskRemoveStrategy
- java.lang.Object
-
- org.hawaiiframework.async.timeout.TaskRemoveStrategy
-
- All Implemented Interfaces:
TaskAbortStrategy
public class TaskRemoveStrategy extends Object implements TaskAbortStrategy
Removes the scheduled task from the executor's queue.- Since:
- 2.0.0
- Author:
- Rutger Lubbers, Paul Klos
-
-
Constructor Summary
Constructors Constructor Description TaskRemoveStrategy(ThreadPoolExecutor executor, Runnable task, String taskType)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
invoke()
Invoke the strategy in order to abort the task (that registered this abort strategy).
-
-
-
Constructor Detail
-
TaskRemoveStrategy
public TaskRemoveStrategy(ThreadPoolExecutor executor, Runnable task, String taskType)
Create a new instance.- Parameters:
executor
- The executor executing or queueing thetask
.task
- The task.taskType
- The type of the task.
-
-
Method Detail
-
invoke
public boolean invoke()
Invoke the strategy in order to abort the task (that registered this abort strategy).- Specified by:
invoke
in interfaceTaskAbortStrategy
-
-