Package org.elasticsearch.action.search
Class SearchShardTask
java.lang.Object
org.elasticsearch.tasks.Task
org.elasticsearch.tasks.CancellableTask
org.elasticsearch.action.search.SearchShardTask
public class SearchShardTask extends CancellableTask
Task storing information about a currently running search shard request.
See
ShardSearchRequest, ShardFetchSearchRequest, ...-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.tasks.Task
Task.Status -
Field Summary
Fields inherited from class org.elasticsearch.tasks.Task
X_OPAQUE_ID -
Constructor Summary
Constructors Constructor Description SearchShardTask(long id, java.lang.String type, java.lang.String action, java.lang.String description, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers) -
Method Summary
Modifier and Type Method Description booleanshouldCancelChildrenOnCancellation()Returns whether this task's children need to be cancelled too.Methods inherited from class org.elasticsearch.tasks.CancellableTask
getReasonCancelled, isCancelled, onCancelledMethods inherited from class org.elasticsearch.tasks.Task
getAction, getDescription, getHeader, getId, getParentTaskId, getStartTime, getStartTimeNanos, getStatus, getType, headers, result, result, taskInfo, taskInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SearchShardTask
public SearchShardTask(long id, java.lang.String type, java.lang.String action, java.lang.String description, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
-
-
Method Details
-
shouldCancelChildrenOnCancellation
public boolean shouldCancelChildrenOnCancellation()Description copied from class:CancellableTaskReturns whether this task's children need to be cancelled too.trueis a reasonable response even for tasks that have no children, since child tasks might be added in future and it'd be easy to forget to update this, but returningfalsesaves a bit of computation in the task manager.- Overrides:
shouldCancelChildrenOnCancellationin classCancellableTask
-