Class LeaderBulkByScrollTaskState

java.lang.Object
org.elasticsearch.index.reindex.LeaderBulkByScrollTaskState

public class LeaderBulkByScrollTaskState extends Object
Tracks the state of sliced subtasks and provides unified status information for a sliced BulkByScrollRequest.
  • Constructor Details

    • LeaderBulkByScrollTaskState

      public LeaderBulkByScrollTaskState(BulkByScrollTask task, int slices)
  • Method Details

    • getSlices

      public int getSlices()
      Returns the number of slices this BulkByScrollRequest will use
    • getStatus

      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, Exception e)
      Record a failure from a slice and respond to the listener if the request is finished.