Class CreatePitRequest

java.lang.Object
org.opensearch.core.transport.TransportMessage
All Implemented Interfaces:
IndicesRequest, IndicesRequest.Replaceable, org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, TaskAwareRequest

@PublicApi(since="2.3.0") public class CreatePitRequest extends ActionRequest implements IndicesRequest.Replaceable, org.opensearch.core.xcontent.ToXContent
A request to make create point in time against one or more indices.
Opensearch.api:
  • Constructor Details

    • CreatePitRequest

      public CreatePitRequest(org.opensearch.common.unit.TimeValue keepAlive, Boolean allowPartialPitCreation, String... indices)
    • CreatePitRequest

      public CreatePitRequest(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class ActionRequest
      Throws:
      IOException
    • getRouting

      public String getRouting()
    • getPreference

      public String getPreference()
    • getIndices

      public String[] getIndices()
    • getIndicesOptions

      public IndicesOptions getIndicesOptions()
    • getKeepAlive

      public org.opensearch.common.unit.TimeValue getKeepAlive()
    • allowPartialPitCreation

      public void allowPartialPitCreation(Boolean allowPartialPitCreation)
      Sets if this request should allow partial results.
    • shouldAllowPartialPitCreation

      public boolean shouldAllowPartialPitCreation()
    • setRouting

      public void setRouting(String routing)
    • setPreference

      public void setPreference(String preference)
    • setIndices

      public void setIndices(String[] indices)
    • setIndicesOptions

      public void setIndicesOptions(IndicesOptions indicesOptions)
    • validate

      Specified by:
      validate in class ActionRequest
    • 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
    • indicesOptions

      public CreatePitRequest indicesOptions(IndicesOptions indicesOptions)
    • setKeepAlive

      public void setKeepAlive(org.opensearch.common.unit.TimeValue keepAlive)
    • buildDescription

      public final String buildDescription()
    • createTask

      public Task createTask(long id, String type, String action, org.opensearch.core.tasks.TaskId parentTaskId, Map<String,String> headers)
      Description copied from interface: TaskAwareRequest
      Returns the task object that should be used to keep track of the processing of the request.
      Specified by:
      createTask in interface TaskAwareRequest
    • indices

      public CreatePitRequest indices(String... indices)
      Description copied from interface: IndicesRequest.Replaceable
      Sets the indices that the action relates to.
      Specified by:
      indices in interface IndicesRequest.Replaceable
    • toXContent

      public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException