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.common.util.concurrent.RefCounted
,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.Empty
Nested 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.String
DEFAULT_REASON
static boolean
DEFAULT_WAIT_FOR_COMPLETION
Fields 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.String
getDescription()
Returns optional description of the request to be displayed by the task managerjava.lang.String
getReason()
The reason for canceling the task.boolean
match(Task task)
CancelTasksRequest
setReason(java.lang.String reason)
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
waitForCompletion()
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
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, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, setParentTask
-
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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classBaseTasksRequest<CancelTasksRequest>
- Throws:
java.io.IOException
-
match
- Overrides:
match
in 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:TaskAwareRequest
Returns optional description of the request to be displayed by the task manager
-