Class RethrottleRequest

  • All Implemented Interfaces:
    org.elasticsearch.common.io.stream.Streamable, org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.tasks.TaskAwareRequest

    public class RethrottleRequest
    extends org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
    A request to change throttling on a task.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest

        org.elasticsearch.transport.TransportRequest.Empty
      • Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

        org.elasticsearch.common.io.stream.Writeable.Reader<V extends java.lang.Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends java.lang.Object>
    • Field Summary

      • Fields inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest

        ALL_ACTIONS, ALL_NODES
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getRequestsPerSecond()
      The throttle to apply to all matching requests in sub-requests per second.
      void readFrom​(org.elasticsearch.common.io.stream.StreamInput in)  
      RethrottleRequest setRequestsPerSecond​(float requestsPerSecond)
      Set the throttle to apply to all matching requests in sub-requests per second.
      org.elasticsearch.action.ActionRequestValidationException validate()  
      void writeTo​(org.elasticsearch.common.io.stream.StreamOutput out)  
      • Methods inherited from class org.elasticsearch.action.ActionRequest

        getShouldStoreResult
      • Methods inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest

        getActions, getNodes, getParentTaskId, getTaskId, getTimeout, match, setActions, setNodes, setParentTaskId, setTaskId, setTimeout, setTimeout
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.elasticsearch.common.io.stream.Streamable

      • Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest

        createTask, getDescription, setParentTask
      • Methods inherited from class org.elasticsearch.transport.TransportMessage

        remoteAddress, remoteAddress
      • Methods inherited from class org.elasticsearch.transport.TransportRequest

        getParentTask, setParentTask
    • Constructor Detail

      • RethrottleRequest

        public RethrottleRequest()
    • Method Detail

      • 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

        public org.elasticsearch.action.ActionRequestValidationException validate()
        Overrides:
        validate in class org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
      • readFrom

        public void readFrom​(org.elasticsearch.common.io.stream.StreamInput in)
                      throws java.io.IOException
        Specified by:
        readFrom in interface org.elasticsearch.common.io.stream.Streamable
        Overrides:
        readFrom in class org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
        Throws:
        java.io.IOException
      • writeTo

        public void writeTo​(org.elasticsearch.common.io.stream.StreamOutput out)
                     throws java.io.IOException
        Specified by:
        writeTo in interface org.elasticsearch.common.io.stream.Streamable
        Specified by:
        writeTo in interface org.elasticsearch.common.io.stream.Writeable
        Overrides:
        writeTo in class org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
        Throws:
        java.io.IOException