Package org.opensearch.index.reindex
Class RethrottleRequest
- java.lang.Object
-
- org.opensearch.transport.TransportMessage
-
- org.opensearch.transport.TransportRequest
-
- org.opensearch.action.ActionRequest
-
- org.opensearch.action.support.tasks.BaseTasksRequest<RethrottleRequest>
-
- org.opensearch.index.reindex.RethrottleRequest
-
- All Implemented Interfaces:
Writeable,TaskAwareRequest
public class RethrottleRequest extends BaseTasksRequest<RethrottleRequest>
A request to change throttling on a task.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opensearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
-
Field Summary
-
Fields inherited from class org.opensearch.action.support.tasks.BaseTasksRequest
ALL_ACTIONS, ALL_NODES
-
-
Constructor Summary
Constructors Constructor Description RethrottleRequest()RethrottleRequest(StreamInput in)
-
Method Summary
All Methods Instance Methods Concrete Methods 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.ActionRequestValidationExceptionvalidate()voidwriteTo(StreamOutput out)-
Methods inherited from class org.opensearch.action.support.tasks.BaseTasksRequest
getActions, getNodes, getParentTaskId, getTaskId, getTimeout, match, setActions, setNodes, setParentTaskId, setTaskId, setTimeout, setTimeout
-
Methods inherited from class org.opensearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.opensearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.opensearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
-
-
-
Constructor Detail
-
RethrottleRequest
public RethrottleRequest()
-
RethrottleRequest
public RethrottleRequest(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBaseTasksRequest<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
public RethrottleRequest setRequestsPerSecond(float requestsPerSecond)
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 ActionRequestValidationException validate()
- Overrides:
validatein classBaseTasksRequest<RethrottleRequest>
-
-