Class AcknowledgedResponse

java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.core.transport.TransportResponse
org.opensearch.core.action.ActionResponse
org.opensearch.action.support.master.AcknowledgedResponse
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentObject
Direct Known Subclasses:
ClusterDeleteWeightedRoutingResponse, ClusterPutWeightedRoutingResponse, ClusterRerouteResponse, ClusterUpdateSettingsResponse, DecommissionResponse, DeleteDecommissionStateResponse, HotToWarmTieringResponse, ShardsAcknowledgedResponse

@PublicApi(since="1.0.0") public class AcknowledgedResponse extends org.opensearch.core.action.ActionResponse implements org.opensearch.core.xcontent.ToXContentObject
A response that indicates that a request has been acknowledged
Opensearch.api:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opensearch.core.transport.TransportResponse

    org.opensearch.core.transport.TransportResponse.Empty

    Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent

    org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable

    org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     

    Fields inherited from interface org.opensearch.core.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    AcknowledgedResponse(boolean acknowledged)
     
    AcknowledgedResponse(org.opensearch.core.common.io.stream.StreamInput in)
     
    AcknowledgedResponse(org.opensearch.core.common.io.stream.StreamInput in, boolean readAcknowledged)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addCustomFields(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params)
     
    protected static <T extends AcknowledgedResponse>
    void
    declareAcknowledgedField(org.opensearch.core.xcontent.ConstructingObjectParser<T,Void> objectParser)
     
    boolean
     
    fromXContent(org.opensearch.core.xcontent.XContentParser parser)
     
    int
     
    final boolean
    Returns whether the response is acknowledged or not
    final org.opensearch.core.xcontent.XContentBuilder
    toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params)
     
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class org.opensearch.core.transport.TransportMessage

    remoteAddress, remoteAddress

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opensearch.core.xcontent.ToXContentObject

    isFragment
  • Field Details

    • acknowledged

      protected boolean acknowledged
  • Constructor Details

    • AcknowledgedResponse

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

      public AcknowledgedResponse(org.opensearch.core.common.io.stream.StreamInput in, boolean readAcknowledged) throws IOException
      Throws:
      IOException
    • AcknowledgedResponse

      public AcknowledgedResponse(boolean acknowledged)
  • Method Details

    • declareAcknowledgedField

      protected static <T extends AcknowledgedResponse> void declareAcknowledgedField(org.opensearch.core.xcontent.ConstructingObjectParser<T,Void> objectParser)
    • isAcknowledged

      public final boolean isAcknowledged()
      Returns whether the response is acknowledged or not
      Returns:
      true if the response is acknowledged, false otherwise
    • 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
      Throws:
      IOException
    • toXContent

      public final 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
    • addCustomFields

      protected void addCustomFields(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Throws:
      IOException
    • fromXContent

      public static AcknowledgedResponse fromXContent(org.opensearch.core.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object