Class RethrottleRequest

All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, TaskAwareRequest

public class RethrottleRequest extends BaseTasksRequest<RethrottleRequest>
A request to change throttling on a task.
  • Constructor Details

    • RethrottleRequest

      public RethrottleRequest()
    • RethrottleRequest

      public RethrottleRequest(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class BaseTasksRequest<RethrottleRequest>
      Throws:
      IOException
    • getRequestsPerSecond

      public float getRequestsPerSecond()
      The throttle to apply to all matching requests in sub-requests per second. 0 means set no throttle and that is the default.
    • setRequestsPerSecond

      public RethrottleRequest setRequestsPerSecond(float requestsPerSecond)
      Set the throttle to apply to all matching requests in sub-requests per second. Float.POSITIVE_INFINITY means set no throttle. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to make sure that it contains any time that we might wait.
    • validate

      Overrides:
      validate in class BaseTasksRequest<RethrottleRequest>