public class RethrottleRequest extends BaseTasksRequest<RethrottleRequest>
TransportRequest.EmptyALL_ACTIONS, ALL_NODES, ALL_TASKSheaders| Constructor and Description |
|---|
RethrottleRequest() |
| Modifier and Type | Method and Description |
|---|---|
float |
getRequestsPerSecond()
The throttle to apply to all matching requests in sub-requests per second.
|
void |
readFrom(StreamInput in) |
RethrottleRequest |
setRequestsPerSecond(float requestsPerSecond)
Set the throttle to apply to all matching requests in sub-requests per second.
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out) |
getActions, getNodesIds, getParentTaskId, getTaskId, getTimeout, match, setActions, setNodesIds, setParentTaskId, setTaskId, setTimeout, setTimeoutcreateTask, getDescriptionremoteAddress, remoteAddresscontextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContextpublic 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 ActionRequestValidationException validate()
validate in class BaseTasksRequest<RethrottleRequest>public void readFrom(StreamInput in) throws IOException
readFrom in interface StreamablereadFrom in class BaseTasksRequest<RethrottleRequest>IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamablewriteTo in class BaseTasksRequest<RethrottleRequest>IOExceptionCopyright © 2009–2017. All rights reserved.