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, GetIndexRequest, GetLifecyclePolicyRequest, GetMappingsRequest, GetSnapshotLifecyclePolicyRequest, GetSnapshotLifecycleStatsRequest, LifecycleManagementStatusRequest, PutComponentTemplateRequest, PutComposableIndexTemplateRequest, PutLicenseRequest, PutLifecyclePolicyRequest, PutMappingRequest, PutSnapshotLifecyclePolicyRequest, RemoveIndexLifecyclePolicyRequest, ResetFeaturesRequest, ResizeRequest, RetryLifecyclePolicyRequest, RolloverRequest, SimulateIndexTemplateRequest, 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 org.elasticsearch.common.unit.TimeValue DEFAULT_ACK_TIMEOUT  
    static org.elasticsearch.common.unit.TimeValue DEFAULT_MASTER_NODE_TIMEOUT  

    Fields inherited from interface org.elasticsearch.client.Validatable

    EMPTY
  • Constructor Summary

    Constructors
    Constructor Description
    TimedRequest()  
  • Method Summary

    Modifier and Type Method Description
    org.elasticsearch.common.unit.TimeValue masterNodeTimeout()
    Returns the timeout for the request to be completed on the master node
    void setMasterTimeout​(org.elasticsearch.common.unit.TimeValue masterTimeout)
    Sets the timeout to connect to the master node
    void setTimeout​(org.elasticsearch.common.unit.TimeValue timeout)
    Sets the timeout to wait for the all the nodes to acknowledge
    org.elasticsearch.common.unit.TimeValue timeout()
    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.elasticsearch.client.Validatable

    validate
  • Field Details

    • DEFAULT_ACK_TIMEOUT

      public static final org.elasticsearch.common.unit.TimeValue DEFAULT_ACK_TIMEOUT
    • DEFAULT_MASTER_NODE_TIMEOUT

      public static final org.elasticsearch.common.unit.TimeValue DEFAULT_MASTER_NODE_TIMEOUT
  • Constructor Details

    • TimedRequest

      public TimedRequest()
  • Method Details

    • setTimeout

      public void setTimeout​(org.elasticsearch.common.unit.TimeValue timeout)
      Sets the timeout to wait for the all the nodes to acknowledge
      Parameters:
      timeout - timeout as a TimeValue
    • setMasterTimeout

      public void setMasterTimeout​(org.elasticsearch.common.unit.TimeValue masterTimeout)
      Sets the timeout to connect to the master node
      Parameters:
      masterTimeout - timeout as a TimeValue
    • timeout

      public org.elasticsearch.common.unit.TimeValue timeout()
      Returns the request timeout
    • masterNodeTimeout

      public org.elasticsearch.common.unit.TimeValue masterNodeTimeout()
      Returns the timeout for the request to be completed on the master node