Package org.elasticsearch.index.reindex
Class RethrottleRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
org.elasticsearch.index.reindex.RethrottleRequest
- All Implemented Interfaces:
org.elasticsearch.common.io.stream.Writeable,org.elasticsearch.common.util.concurrent.RefCounted,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.EmptyNested 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 -
Constructor Summary
Constructors Constructor Description RethrottleRequest()RethrottleRequest(org.elasticsearch.common.io.stream.StreamInput in) -
Method Summary
Modifier and Type Method Description floatgetRequestsPerSecond()The throttle to apply to all matching requests in sub-requests per second.RethrottleRequestsetRequestsPerSecond(float requestsPerSecond)Set the throttle to apply to all matching requests in sub-requests per second.org.elasticsearch.action.ActionRequestValidationExceptionvalidate()voidwriteTo(org.elasticsearch.common.io.stream.StreamOutput out)Methods inherited from class org.elasticsearch.action.support.tasks.BaseTasksRequest
getActions, getNodes, getParentTaskId, getTaskId, getTimeout, match, setActions, setNodes, setParentTaskId, setTaskId, setTimeout, setTimeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Constructor Details
-
RethrottleRequest
public RethrottleRequest() -
RethrottleRequest
public RethrottleRequest(org.elasticsearch.common.io.stream.StreamInput in) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
public void writeTo(org.elasticsearch.common.io.stream.StreamOutput out) throws java.io.IOException- Specified by:
writeToin interfaceorg.elasticsearch.common.io.stream.Writeable- Overrides:
writeToin classorg.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>- Throws:
java.io.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
Set the throttle to apply to all matching requests in sub-requests per second.Float.POSITIVE_INFINITYmeans 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:
validatein classorg.elasticsearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
-