Class ResetFeatureStateResponse.ResetFeatureStateStatus

java.lang.Object
org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateResponse.ResetFeatureStateStatus
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject
Enclosing class:
ResetFeatureStateResponse

public static class ResetFeatureStateResponse.ResetFeatureStateStatus
extends java.lang.Object
implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
An object with the name of a feature and a message indicating success or failure.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  ResetFeatureStateResponse.ResetFeatureStateStatus.Status
    Success or failure enum.

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params

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

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)
    Without a convenient way to compare Exception equality, we consider only feature name and success or failure for equality.
    static ResetFeatureStateResponse.ResetFeatureStateStatus failure​(java.lang.String featureName, java.lang.Exception exception)
    Create a feature status for a failed reset operation
    java.lang.Exception getException()  
    java.lang.String getFeatureName()  
    ResetFeatureStateResponse.ResetFeatureStateStatus.Status getStatus()  
    int hashCode()  
    static ResetFeatureStateResponse.ResetFeatureStateStatus success​(java.lang.String featureName)
    Create a feature status for a successful reset operation
    java.lang.String toString()  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Method Details

    • success

      public static ResetFeatureStateResponse.ResetFeatureStateStatus success​(java.lang.String featureName)
      Create a feature status for a successful reset operation
      Parameters:
      featureName - Name of the feature whose state was successfully reset
      Returns:
      Success status for a feature
    • failure

      public static ResetFeatureStateResponse.ResetFeatureStateStatus failure​(java.lang.String featureName, java.lang.Exception exception)
      Create a feature status for a failed reset operation
      Parameters:
      featureName - Name of the feature that failed
      exception - The exception that caused or described the failure
      Returns:
      Failure status for a feature
    • getFeatureName

      public java.lang.String getFeatureName()
      Returns:
      Name of the feature we tried to reset
    • getStatus

      Returns:
      Success or failure for the reset operation
    • getException

      @Nullable public java.lang.Exception getException()
      Returns:
      For a failed reset operation, the exception that caused or describes the failure.
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • equals

      public boolean equals​(java.lang.Object o)
      Without a convenient way to compare Exception equality, we consider only feature name and success or failure for equality.
      Overrides:
      equals in class java.lang.Object
      Parameters:
      o - An object to compare for equality
      Returns:
      True if the feature name and status are equal, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      Hash code based only on feature name and status.
    • writeTo

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

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object