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.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.cluster.SimpleDiffable
EMPTY
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static SingleFeatureMigrationResult
Creates 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.int
hashCode()
boolean
Returnstrue
if the migration of this feature's data succeeded, orfalse
otherwise.static SingleFeatureMigrationResult
success()
Creates a record indicating that migration succeeded.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diff
Methods 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()Returnstrue
if the migration of this feature's data succeeded, orfalse
otherwise. -
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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-