Package org.elasticsearch.index.reindex
Class LeaderBulkByScrollTaskState
java.lang.Object
org.elasticsearch.index.reindex.LeaderBulkByScrollTaskState
public class LeaderBulkByScrollTaskState
extends java.lang.Object
Tracks the state of sliced subtasks and provides unified status information for a sliced BulkByScrollRequest.
-
Constructor Summary
Constructors Constructor Description LeaderBulkByScrollTaskState(BulkByScrollTask task, int slices) -
Method Summary
Modifier and Type Method Description intgetSlices()Returns the number of slices this BulkByScrollRequest will useBulkByScrollTask.StatusgetStatus()Get the combined statuses of sliced subtasksBulkByScrollTask.StatusgetStatus(java.util.List<BulkByScrollTask.StatusOrException> statuses)Get the combined statuses of slice subtasks, merged with the given list of statusesvoidonSliceFailure(ActionListener<BulkByScrollResponse> listener, int sliceId, java.lang.Exception e)Record a failure from a slice and respond to the listener if the request is finished.voidonSliceResponse(ActionListener<BulkByScrollResponse> listener, int sliceId, BulkByScrollResponse response)Record a response from a slice and respond to the listener if the request is finished.intrunningSliceSubTasks()The number of sliced subtasks that are still running
-
Constructor Details
-
Method Details
-
getSlices
public int getSlices()Returns the number of slices this BulkByScrollRequest will use -
getStatus
public BulkByScrollTask.Status getStatus(java.util.List<BulkByScrollTask.StatusOrException> statuses)Get the combined statuses of slice subtasks, merged with the given list of statuses -
getStatus
Get the combined statuses of sliced subtasks -
runningSliceSubTasks
public int runningSliceSubTasks()The number of sliced subtasks that are still running -
onSliceResponse
public void onSliceResponse(ActionListener<BulkByScrollResponse> listener, int sliceId, BulkByScrollResponse response)Record a response from a slice and respond to the listener if the request is finished. -
onSliceFailure
public void onSliceFailure(ActionListener<BulkByScrollResponse> listener, int sliceId, java.lang.Exception e)Record a failure from a slice and respond to the listener if the request is finished.
-