Class SingleShardRequest<Request extends SingleShardRequest<Request>>

All Implemented Interfaces:
IndicesRequest, Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest
Direct Known Subclasses:
AnalyzeAction.Request, ExplainRequest, GetFieldMappingsIndexRequest, GetRequest, MultiGetShardRequest, MultiTermVectorsShardRequest, RetentionLeaseActions.AddRequest, RetentionLeaseActions.RemoveRequest, RetentionLeaseActions.RenewRequest, TermVectorsRequest

public abstract class SingleShardRequest<Request extends SingleShardRequest<Request>> extends ActionRequest implements IndicesRequest
  • Field Details

    • INDICES_OPTIONS

      public static final IndicesOptions INDICES_OPTIONS
    • index

      @Nullable protected String index
      The concrete index name Whether index property is optional depends on the concrete implementation. If index property is required the concrete implementation should use validateNonNullIndex() to check if the index property has been set
  • Constructor Details

    • SingleShardRequest

      public SingleShardRequest()
    • SingleShardRequest

      public SingleShardRequest(StreamInput in) throws IOException
      Throws:
      IOException
    • SingleShardRequest

      protected SingleShardRequest(String index)
  • Method Details

    • validateNonNullIndex

      protected ActionRequestValidationException validateNonNullIndex()
      Returns:
      a validation exception if the index property hasn't been set
    • index

      @Nullable public String index()
      Returns:
      The concrete index this request is targeted for or null if index is optional. Whether index property is optional depends on the concrete implementation. If index property is required the concrete implementation should use validateNonNullIndex() to check if the index property has been set
    • index

      public final Request index(String index)
      Sets the index.
    • indices

      public String[] indices()
      Description copied from interface: IndicesRequest
      Returns the array of indices that the action relates to
      Specified by:
      indices in interface IndicesRequest
    • indicesOptions

      public IndicesOptions indicesOptions()
      Description copied from interface: IndicesRequest
      Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.
      Specified by:
      indicesOptions in interface IndicesRequest
    • 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 ActionRequest
      Throws:
      IOException