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 int
getSlices()
Returns the number of slices this BulkByScrollRequest will useBulkByScrollTask.Status
getStatus()
Get the combined statuses of sliced subtasksBulkByScrollTask.Status
getStatus(java.util.List<BulkByScrollTask.StatusOrException> statuses)
Get the combined statuses of slice subtasks, merged with the given list of statusesvoid
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.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.int
runningSliceSubTasks()
The number of sliced subtasks that are still running
-
-
-
Constructor Detail
-
LeaderBulkByScrollTaskState
public LeaderBulkByScrollTaskState(BulkByScrollTask task, int slices)
-
-
Method Detail
-
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
public BulkByScrollTask.Status 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.
-
-