Package org.elasticsearch.upgrades
Class SingleFeatureMigrationResult
java.lang.Object
org.elasticsearch.upgrades.SingleFeatureMigrationResult
- All Implemented Interfaces:
Diffable<SingleFeatureMigrationResult>
,SimpleDiffable<SingleFeatureMigrationResult>
,Writeable
,org.elasticsearch.xcontent.ToXContent
public class SingleFeatureMigrationResult
extends Object
implements SimpleDiffable<SingleFeatureMigrationResult>, 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.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.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.cluster.SimpleDiffable
EMPTY
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static SingleFeatureMigrationResult
Creates a record indicating that migration failed.static SingleFeatureMigrationResult
fromXContent
(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.int
hashCode()
boolean
boolean
Returnstrue
if the migration of this feature's data succeeded, orfalse
otherwise.static SingleFeatureMigrationResult
success()
Creates a record indicating that migration succeeded.org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.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, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diff
-
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()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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
isFragment
public boolean isFragment()- Specified by:
isFragment
in interfaceorg.elasticsearch.xcontent.ToXContent
-
equals
-
hashCode
public int hashCode()
-