Package org.elasticsearch.upgrades
Class SingleFeatureMigrationResult
java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<SingleFeatureMigrationResult>
org.elasticsearch.upgrades.SingleFeatureMigrationResult
- All Implemented Interfaces:
Diffable<SingleFeatureMigrationResult>
,Writeable
,ToXContent
public class SingleFeatureMigrationResult
extends AbstractDiffable<SingleFeatureMigrationResult>
implements Writeable, 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
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.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static SingleFeatureMigrationResult
Creates a record indicating that migration failed.static SingleFeatureMigrationResult
fromXContent
(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.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.AbstractDiffable
diff, readDiffFrom
-
Method Details
-
fromXContent
-
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
-
isFragment
public boolean isFragment()- Specified by:
isFragment
in interfaceToXContent
-
equals
-
hashCode
public int hashCode()
-