All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted, TaskAwareRequest

public class CancelTasksRequest
extends BaseTasksRequest<CancelTasksRequest>
A request to cancel tasks
  • Field Details

    • DEFAULT_REASON

      public static final java.lang.String DEFAULT_REASON
      See Also:
      Constant Field Values
    • DEFAULT_WAIT_FOR_COMPLETION

      public static final boolean DEFAULT_WAIT_FOR_COMPLETION
      See Also:
      Constant Field Values
  • Constructor Details

    • CancelTasksRequest

      public CancelTasksRequest()
    • CancelTasksRequest

      public CancelTasksRequest​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class BaseTasksRequest<CancelTasksRequest>
      Throws:
      java.io.IOException
    • match

      public boolean match​(Task task)
      Overrides:
      match in class BaseTasksRequest<CancelTasksRequest>
    • setReason

      public CancelTasksRequest setReason​(java.lang.String reason)
      Set the reason for canceling the task.
    • getReason

      public java.lang.String getReason()
      The reason for canceling the task.
    • setWaitForCompletion

      public void setWaitForCompletion​(boolean waitForCompletion)
      If true, the request blocks until the cancellation of the task and its descendant tasks is completed. Otherwise, the request can return soon after the cancellation is started. Defaults to false.
    • waitForCompletion

      public boolean waitForCompletion()
    • getDescription

      public java.lang.String getDescription()
      Description copied from interface: TaskAwareRequest
      Returns optional description of the request to be displayed by the task manager