Class PostFeatureUpgradeResponse

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class PostFeatureUpgradeResponse extends ActionResponse implements org.elasticsearch.xcontent.ToXContentObject
The response to return to a request for a system feature upgrade
  • Constructor Details

    • PostFeatureUpgradeResponse

      public PostFeatureUpgradeResponse(boolean accepted, List<PostFeatureUpgradeResponse.Feature> features, @Nullable String reason, @Nullable ElasticsearchException exception)
      Parameters:
      accepted - Whether the upgrade request is accepted by the server
      features - A list of the features that will be upgraded
      reason - If the upgrade is rejected, the reason for rejection. Null otherwise.
      exception - If the upgrade is rejected because of an exception, the exception. Null otherwise.
    • PostFeatureUpgradeResponse

      public PostFeatureUpgradeResponse(StreamInput in) throws IOException
      Parameters:
      in - A stream input for a serialized response object
      Throws:
      IOException - if we can't deserialize the object
  • Method Details

    • toXContent

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

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • isAccepted

      public boolean isAccepted()
    • getFeatures

    • getReason

      @Nullable public String getReason()
    • getElasticsearchException

      @Nullable public ElasticsearchException getElasticsearchException()
    • equals

      public boolean equals(Object o)
      We disregard exceptions when determining response equality
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      We disregard exceptions when calculating hash code
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object