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,org.elasticsearch.core.RefCounted,TaskAwareRequest
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
FieldsFields inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
ALL_ACTIONS, ALL_NODES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns optional description of the request to be displayed by the task managerThe reason for canceling the task.booleanSet 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.booleanvoidwriteTo(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.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, setParentTask
-
Field Details
-
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:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBaseTasksRequest<CancelTasksRequest>- Throws:
IOException
-
match
- Overrides:
matchin classBaseTasksRequest<CancelTasksRequest>
-
setReason
Set the reason for canceling the task. -
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
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager
-