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
  • Constructor Details

    • TaskRemoveStrategy

      public TaskRemoveStrategy(ThreadPoolExecutor executor, Runnable task, String taskType, String taskId)
      Create a new instance.
      Parameters:
      executor - The executor executing or queueing the task.
      task - The task.
      taskType - The type of the task.
      taskId - The task id.
  • Method Details

    • invoke

      public boolean invoke()
      Description copied from interface: TaskAbortStrategy
      Invoke the strategy in order to abort the task (that registered this abort strategy).
      Specified by:
      invoke in interface TaskAbortStrategy
      Returns:
      true if the task has been aborted.