Package org.elasticsearch.client
Class TimedRequest
java.lang.Object
org.elasticsearch.client.TimedRequest
- All Implemented Interfaces:
Validatable
- Direct Known Subclasses:
CloseIndexRequest,CreateIndexRequest,DeleteAliasRequest,DeleteComponentTemplateRequest,DeleteComposableIndexTemplateRequest,DeleteLicenseRequest,DeleteLifecyclePolicyRequest,DeleteSnapshotLifecyclePolicyRequest,ExecuteSnapshotLifecyclePolicyRequest,ExecuteSnapshotLifecycleRetentionRequest,ExplainLifecycleRequest,FreezeIndexRequest,GetFeaturesRequest,GetFeatureUpgradeStatusRequest,GetIndexRequest,GetLifecyclePolicyRequest,GetMappingsRequest,GetSnapshotLifecyclePolicyRequest,GetSnapshotLifecycleStatsRequest,LifecycleManagementStatusRequest,PostFeatureUpgradeRequest,PutComponentTemplateRequest,PutComposableIndexTemplateRequest,PutLicenseRequest,PutLifecyclePolicyRequest,PutMappingRequest,PutSnapshotLifecyclePolicyRequest,RemoveIndexLifecyclePolicyRequest,ResetFeaturesRequest,ResizeRequest,RetryLifecyclePolicyRequest,RolloverRequest,SimulateIndexTemplateRequest,SnapshotLifecycleManagementStatusRequest,StartBasicRequest,StartILMRequest,StartSLMRequest,StopILMRequest,StopSLMRequest,UnfreezeIndexRequest,XPackUsageRequest
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
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.core.TimeValuestatic final org.elasticsearch.core.TimeValueFields inherited from interface org.elasticsearch.client.Validatable
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.core.TimeValueReturns the timeout for the request to be completed on the master nodevoidsetMasterTimeout(org.elasticsearch.core.TimeValue masterTimeout) Sets the timeout to connect to the master nodevoidsetTimeout(org.elasticsearch.core.TimeValue timeout) Sets the timeout to wait for the all the nodes to acknowledgeorg.elasticsearch.core.TimeValuetimeout()Returns the request timeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.client.Validatable
validate
-
Field Details
-
DEFAULT_ACK_TIMEOUT
public static final org.elasticsearch.core.TimeValue DEFAULT_ACK_TIMEOUT -
DEFAULT_MASTER_NODE_TIMEOUT
public static final org.elasticsearch.core.TimeValue DEFAULT_MASTER_NODE_TIMEOUT
-
-
Constructor Details
-
TimedRequest
public TimedRequest()
-
-
Method Details
-
setTimeout
public void setTimeout(org.elasticsearch.core.TimeValue timeout) Sets the timeout to wait for the all the nodes to acknowledge- Parameters:
timeout- timeout as aTimeValue
-
setMasterTimeout
public void setMasterTimeout(org.elasticsearch.core.TimeValue masterTimeout) Sets the timeout to connect to the master node- Parameters:
masterTimeout- timeout as aTimeValue
-
timeout
public org.elasticsearch.core.TimeValue timeout()Returns the request timeout -
masterNodeTimeout
public org.elasticsearch.core.TimeValue masterNodeTimeout()Returns the timeout for the request to be completed on the master node
-