Class SingleFeatureMigrationResult

java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<SingleFeatureMigrationResult>
org.elasticsearch.upgrades.SingleFeatureMigrationResult
All Implemented Interfaces:
Diffable<SingleFeatureMigrationResult>, Writeable, org.elasticsearch.xcontent.ToXContent

public class SingleFeatureMigrationResult extends AbstractDiffable<SingleFeatureMigrationResult> implements Writeable, org.elasticsearch.xcontent.ToXContent
Holds the results of migrating a single feature. See also FeatureMigrationResults.
  • Method Details

    • fromXContent

      public static SingleFeatureMigrationResult fromXContent(org.elasticsearch.xcontent.XContentParser parser)
    • success

      public static SingleFeatureMigrationResult success()
      Creates a record indicating that migration succeeded.
    • failure

      public static SingleFeatureMigrationResult failure(String failedIndexName, Exception exception)
      Creates a record indicating that migration failed.
      Parameters:
      failedIndexName - The name of the specific index whose migration failed.
      exception - The exception which caused the migration failure.
    • succeeded

      public boolean succeeded()
      Returns true if the migration of this feature's data succeeded, or false otherwise.
    • getFailedIndexName

      @Nullable public String getFailedIndexName()
      Gets the name of the specific index where the migration failure occurred, if the migration failed.
    • getException

      @Nullable public Exception getException()
      Gets the exception that cause the migration failure, if the migration failed.
    • 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
    • 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
    • isFragment

      public boolean isFragment()
      Specified by:
      isFragment in interface org.elasticsearch.xcontent.ToXContent
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object