Class AcknowledgedRequest<Request extends MasterNodeRequest<Request>>

All Implemented Interfaces:
AckedRequest, Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest
Direct Known Subclasses:
AddIndexBlockRequest, CleanupRepositoryRequest, CloseIndexRequest, ClusterRerouteRequest, ClusterUpdateSettingsRequest, CreateIndexRequest, DeleteDanglingIndexRequest, DeleteIndexRequest, DeletePipelineRequest, DeleteRepositoryRequest, DeleteStoredScriptRequest, ImportDanglingIndexRequest, IndicesAliasesRequest, OpenIndexRequest, PutMappingRequest, PutPipelineRequest, PutRepositoryRequest, PutStoredScriptRequest, ResizeRequest, RolloverRequest, UpdateSettingsRequest, UpgradeSettingsRequest, VerifyRepositoryRequest

public abstract class AcknowledgedRequest<Request extends MasterNodeRequest<Request>> extends MasterNodeRequest<Request> implements AckedRequest
Abstract class that allows to mark action requests that support acknowledgements. Facilitates consistency across different api.
  • Field Details

    • DEFAULT_ACK_TIMEOUT

      public static final org.elasticsearch.core.TimeValue DEFAULT_ACK_TIMEOUT
    • timeout

      protected org.elasticsearch.core.TimeValue timeout
  • Constructor Details

  • Method Details

    • timeout

      public final Request timeout(String timeout)
      Allows to set the timeout
      Parameters:
      timeout - timeout as a string (e.g. 1s)
      Returns:
      the request itself
    • timeout

      public final Request timeout(org.elasticsearch.core.TimeValue timeout)
      Allows to set the timeout
      Parameters:
      timeout - timeout as a TimeValue
      Returns:
      the request itself
    • timeout

      public final org.elasticsearch.core.TimeValue timeout()
      Returns the current timeout
      Returns:
      the current timeout as a TimeValue
    • ackTimeout

      public org.elasticsearch.core.TimeValue ackTimeout()
      Description copied from interface: AckedRequest
      Returns the acknowledgement timeout
      Specified by:
      ackTimeout in interface AckedRequest
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class MasterNodeRequest<Request extends MasterNodeRequest<Request>>
      Throws:
      IOException