Module org.elasticsearch.server
Package org.elasticsearch.action.bulk
Enum Class IndexDocFailureStoreStatus
- All Implemented Interfaces:
Serializable
,Comparable<IndexDocFailureStoreStatus>
,Constable
,Writeable
,ToXContent
,ToXContentFragment
public enum IndexDocFailureStoreStatus
extends Enum<IndexDocFailureStoreStatus>
implements ToXContentFragment, Writeable
Captures the role of the failure store in this document response. For example,
- USED, means that this document was stored in the failure store
- NOT_ENABLED, means that this document was rejected by elasticsearch, but it could have been stored in
the failure store has it been enabled.
- FAILED, means that this failed document was eligible to be stored in the failure store and the failure store
was enabled but something went wrong.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Exception wrapper class that adds the failure store status in the XContent response.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
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>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis status represents that this document was rejected from the failure store.This status represents that we have no information about this response or that the failure store is not applicable.This status represents that this document was rejected, but it could have ended up in the failure store if it was enabled.This status represents that this document was stored in the failure store successfully. -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionstatic IndexDocFailureStoreStatus
fromId
(byte id) byte
getId()
getLabel()
static IndexDocFailureStoreStatus
read
(StreamInput in) toXContent
(XContentBuilder builder, ToXContent.Params params) static IndexDocFailureStoreStatus
Returns the enum constant of this class with the specified name.static IndexDocFailureStoreStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Enum Constant Details
-
NOT_APPLICABLE_OR_UNKNOWN
This status represents that we have no information about this response or that the failure store is not applicable. For example: - when the doc was successfully indexed in a backing index of a data stream, - when we are running in a mixed version cluster and the information is not available, - when the doc was rejected by elasticsearch but failure store was not applicable (i.e. the target was an index). -
USED
This status represents that this document was stored in the failure store successfully. -
NOT_ENABLED
This status represents that this document was rejected, but it could have ended up in the failure store if it was enabled. -
FAILED
This status represents that this document was rejected from the failure store.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
read
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getId
public byte getId()- Returns:
- id of the status, mainly used for wire serialisation purposes
-
getLabel
- Returns:
- the label of this status for display, just lowercase of the enum
-
fromId
- Parameters:
id
- a candidate id that (hopefully) can be converted to a FailureStoreStatus, used in wire serialisation- Returns:
- the failure store status that corresponds to the id.
- Throws:
IllegalArgumentException
- when the id cannot produce a failure store status
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-