Package org.elasticsearch.client
Class TimedRequest
java.lang.Object
org.elasticsearch.client.TimedRequest
- All Implemented Interfaces:
Validatable
- Direct Known Subclasses:
CloseIndexRequest,CreateIndexRequest,DeleteAliasRequest,DeleteLicenseRequest,DeleteLifecyclePolicyRequest,DeleteSnapshotLifecyclePolicyRequest,ExecuteSnapshotLifecyclePolicyRequest,ExecuteSnapshotLifecycleRetentionRequest,ExplainLifecycleRequest,FreezeIndexRequest,GetIndexRequest,GetLifecyclePolicyRequest,GetMappingsRequest,GetSnapshotLifecyclePolicyRequest,GetSnapshotLifecycleStatsRequest,LifecycleManagementStatusRequest,PutLicenseRequest,PutLifecyclePolicyRequest,PutMappingRequest,PutSnapshotLifecyclePolicyRequest,RemoveIndexLifecyclePolicyRequest,ResizeRequest,RetryLifecyclePolicyRequest,RolloverRequest,SnapshotLifecycleManagementStatusRequest,StartBasicRequest,StartILMRequest,StartSLMRequest,StopILMRequest,StopSLMRequest,UnfreezeIndexRequest,XPackUsageRequest
public abstract class TimedRequest extends java.lang.Object implements Validatable
A base request for any requests that supply timeouts.
Please note, any requests that use a ackTimeout should set timeout as they
represent the same backing field on the server.
-
Field Summary
Fields Modifier and Type Field Description static TimeValueDEFAULT_ACK_TIMEOUTstatic TimeValueDEFAULT_MASTER_NODE_TIMEOUT -
Constructor Summary
Constructors Constructor Description TimedRequest() -
Method Summary
Modifier and Type Method Description TimeValuemasterNodeTimeout()Returns the timeout for the request to be completed on the master nodevoidsetMasterTimeout(TimeValue masterTimeout)Sets the timeout to connect to the master nodevoidsetTimeout(TimeValue timeout)Sets the timeout to wait for the all the nodes to acknowledgeTimeValuetimeout()Returns the request timeout
-
Field Details
-
Constructor Details
-
TimedRequest
public TimedRequest()
-
-
Method Details
-
setTimeout
Sets the timeout to wait for the all the nodes to acknowledge- Parameters:
timeout- timeout as aTimeValue
-
setMasterTimeout
Sets the timeout to connect to the master node- Parameters:
masterTimeout- timeout as aTimeValue
-
timeout
Returns the request timeout -
masterNodeTimeout
Returns the timeout for the request to be completed on the master node
-