Package org.elasticsearch.action.search
Class SearchTask
java.lang.Object
org.elasticsearch.tasks.Task
org.elasticsearch.tasks.CancellableTask
org.elasticsearch.action.search.SearchTask
public class SearchTask extends CancellableTask
Task storing information about a currently running
SearchRequest
.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SearchTask(long id, java.lang.String type, java.lang.String action, java.util.function.Supplier<java.lang.String> descriptionSupplier, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
-
Method Summary
Modifier and Type Method Description java.lang.String
getDescription()
Generates task descriptionSearchProgressListener
getProgressListener()
Return theSearchProgressListener
attached to this task.void
setProgressListener(SearchProgressListener progressListener)
Attach aSearchProgressListener
to this task.boolean
shouldCancelChildrenOnCancellation()
Returns true if this task can potentially have children that need to be cancelled when it parent is cancelled.Methods inherited from class org.elasticsearch.tasks.CancellableTask
cancelOnParentLeaving, getReasonCancelled, isCancelled, onCancelled
Methods inherited from class org.elasticsearch.tasks.Task
getAction, getHeader, getId, getParentTaskId, getStartTime, getStartTimeNanos, getStatus, getType, headers, result, result, taskInfo, taskInfo
-
Constructor Details
-
SearchTask
public SearchTask(long id, java.lang.String type, java.lang.String action, java.util.function.Supplier<java.lang.String> descriptionSupplier, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
-
-
Method Details
-
getDescription
public final java.lang.String getDescription()Description copied from class:Task
Generates task description- Overrides:
getDescription
in classTask
-
setProgressListener
Attach aSearchProgressListener
to this task. -
getProgressListener
Return theSearchProgressListener
attached to this task. -
shouldCancelChildrenOnCancellation
public boolean shouldCancelChildrenOnCancellation()Description copied from class:CancellableTask
Returns true if this task can potentially have children that need to be cancelled when it parent is cancelled.- Specified by:
shouldCancelChildrenOnCancellation
in classCancellableTask
-