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.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
ALL_ACTIONS, ALL_NODES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns optional description of the request to be displayed by the task managerThe reason for canceling the task.boolean
Set the reason for canceling the task.void
setWaitForCompletion(boolean waitForCompletion)
Iftrue
, the request blocks until the cancellation of the task and its descendant tasks is completed.boolean
void
writeTo(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, validate
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toString
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classBaseTasksRequest<CancelTasksRequest>
- Throws:
IOException
-
match
- Overrides:
match
in 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:TaskAwareRequest
Returns optional description of the request to be displayed by the task manager
-