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>
Constructor | Description |
---|---|
RethrottleRequest() |
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) |
getActions, getNodes, getParentTaskId, getTaskId, getTimeout, match, setActions, setNodes, setParentTaskId, setTaskId, setTimeout, setTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTask, getDescription, setParentTask
public float getRequestsPerSecond()
public RethrottleRequest setRequestsPerSecond(float requestsPerSecond)
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.public org.elasticsearch.action.ActionRequestValidationException validate()
validate
in class org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
public void readFrom(org.elasticsearch.common.io.stream.StreamInput in) throws java.io.IOException
readFrom
in interface org.elasticsearch.common.io.stream.Streamable
readFrom
in class org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
java.io.IOException
public void writeTo(org.elasticsearch.common.io.stream.StreamOutput out) throws java.io.IOException
writeTo
in interface org.elasticsearch.common.io.stream.Streamable
writeTo
in interface org.elasticsearch.common.io.stream.Writeable
writeTo
in class org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
java.io.IOException