Package org.elasticsearch.upgrades
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested 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.xcontent.ToXContent
EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SingleFeatureMigrationResultCreates a record indicating that migration failed.static SingleFeatureMigrationResultfromXContent(org.elasticsearch.xcontent.XContentParser parser) Gets the exception that cause the migration failure, if the migration failed.Gets the name of the specific index where the migration failure occurred, if the migration failed.inthashCode()booleanbooleanReturnstrueif the migration of this feature's data succeeded, orfalseotherwise.static SingleFeatureMigrationResultsuccess()Creates a record indicating that migration succeeded.org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.AbstractDiffable
diff, readDiffFrom
-
Method Details
-
fromXContent
public static SingleFeatureMigrationResult fromXContent(org.elasticsearch.xcontent.XContentParser parser) -
success
Creates a record indicating that migration succeeded. -
failure
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()Returnstrueif the migration of this feature's data succeeded, orfalseotherwise. -
getFailedIndexName
Gets the name of the specific index where the migration failure occurred, if the migration failed. -
getException
Gets the exception that cause the migration failure, if the migration failed. -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
isFragment
public boolean isFragment()- Specified by:
isFragmentin interfaceorg.elasticsearch.xcontent.ToXContent
-
equals
-
hashCode
public int hashCode()
-