Module org.elasticsearch.server
Package org.elasticsearch.upgrades
Class SingleFeatureMigrationResult
java.lang.Object
org.elasticsearch.upgrades.SingleFeatureMigrationResult
- All Implemented Interfaces:
Diffable<SingleFeatureMigrationResult>,SimpleDiffable<SingleFeatureMigrationResult>,Writeable,ToXContent,ToXContentObject
public class SingleFeatureMigrationResult
extends Object
implements SimpleDiffable<SingleFeatureMigrationResult>, Writeable, ToXContentObject
Holds the results of migrating a single feature. See also
FeatureMigrationResults.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SingleFeatureMigrationResultCreates a record indicating that migration failed.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()booleanReturnstrueif the migration of this feature's data succeeded, orfalseotherwise.static SingleFeatureMigrationResultsuccess()Creates a record indicating that migration succeeded.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Method Details
-
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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-