Class CancelTasksRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.tasks.BaseTasksRequest<CancelTasksRequest>
org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest
- All Implemented Interfaces:
Writeable,TaskAwareRequest
public class CancelTasksRequest extends BaseTasksRequest<CancelTasksRequest>
A request to cancel tasks
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_REASONstatic booleanDEFAULT_WAIT_FOR_COMPLETIONFields inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
ALL_ACTIONS, ALL_NODES -
Constructor Summary
Constructors Constructor Description CancelTasksRequest()CancelTasksRequest(StreamInput in) -
Method Summary
Modifier and Type Method Description java.lang.StringgetDescription()Returns optional description of the request to be displayed by the task managerjava.lang.StringgetReason()The reason for canceling the task.booleanmatch(Task task)CancelTasksRequestsetReason(java.lang.String reason)Set the reason for canceling the task.voidsetWaitForCompletion(boolean waitForCompletion)Iftrue, the request blocks until the cancellation of the task and its descendant tasks is completed.booleanwaitForCompletion()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
getActions, getNodes, getParentTaskId, getTaskId, getTimeout, setActions, setNodes, setParentTaskId, setTaskId, setTimeout, setTimeout, validateMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
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
- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBaseTasksRequest<CancelTasksRequest>- Throws:
java.io.IOException
-
match
- Overrides:
matchin classBaseTasksRequest<CancelTasksRequest>
-
setReason
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)Iftrue, 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 tofalse. -
waitForCompletion
public boolean waitForCompletion() -
getDescription
public java.lang.String getDescription()Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager
-