Package org.opensearch.client
Class TimedRequest
- java.lang.Object
-
- org.opensearch.client.TimedRequest
-
- All Implemented Interfaces:
Validatable
- Direct Known Subclasses:
CloseIndexRequest,CreateIndexRequest,DeleteAliasRequest,DeleteComponentTemplateRequest,DeleteComposableIndexTemplateRequest,DeleteSnapshotLifecyclePolicyRequest,ExecuteSnapshotLifecyclePolicyRequest,ExecuteSnapshotLifecycleRetentionRequest,GetIndexRequest,GetMappingsRequest,GetSnapshotLifecyclePolicyRequest,GetSnapshotLifecycleStatsRequest,PutComponentTemplateRequest,PutComposableIndexTemplateRequest,PutMappingRequest,PutSnapshotLifecyclePolicyRequest,ResizeRequest,RolloverRequest,SimulateIndexTemplateRequest,SnapshotLifecycleManagementStatusRequest,StartSLMRequest,StopSLMRequest
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 org.opensearch.common.unit.TimeValueDEFAULT_ACK_TIMEOUTstatic org.opensearch.common.unit.TimeValueDEFAULT_MASTER_NODE_TIMEOUT-
Fields inherited from interface org.opensearch.client.Validatable
EMPTY
-
-
Constructor Summary
Constructors Constructor Description TimedRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opensearch.common.unit.TimeValuemasterNodeTimeout()Returns the timeout for the request to be completed on the master nodevoidsetMasterTimeout(org.opensearch.common.unit.TimeValue masterTimeout)Sets the timeout to connect to the master nodevoidsetTimeout(org.opensearch.common.unit.TimeValue timeout)Sets the timeout to wait for the all the nodes to acknowledgeorg.opensearch.common.unit.TimeValuetimeout()Returns the request timeout-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.Validatable
validate
-
-
-
-
Method Detail
-
setTimeout
public void setTimeout(org.opensearch.common.unit.TimeValue timeout)
Sets the timeout to wait for the all the nodes to acknowledge- Parameters:
timeout- timeout as aTimeValue
-
setMasterTimeout
public void setMasterTimeout(org.opensearch.common.unit.TimeValue masterTimeout)
Sets the timeout to connect to the master node- Parameters:
masterTimeout- timeout as aTimeValue
-
timeout
public org.opensearch.common.unit.TimeValue timeout()
Returns the request timeout
-
masterNodeTimeout
public org.opensearch.common.unit.TimeValue masterNodeTimeout()
Returns the timeout for the request to be completed on the master node
-
-