Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.ilm
Class LifecycleOperationMetadata
java.lang.Object
org.elasticsearch.xpack.core.ilm.LifecycleOperationMetadata
- All Implemented Interfaces:
Diffable<Metadata.Custom>,Metadata.Custom,NamedDiffable<Metadata.Custom>,NamedWriteable,VersionedNamedWriteable,Writeable,ChunkedToXContent
Class that encapsulates the running operation mode of Index Lifecycle
Management and Snapshot Lifecycle Management
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LifecycleOperationMetadatastatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<LifecycleOperationMetadata, Void> static final org.elasticsearch.xcontent.ParseFieldstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionLifecycleOperationMetadata(OperationMode ilmOperationMode, OperationMode slmOperationMode) -
Method Summary
Modifier and TypeMethodDescriptioncontext()static OperationModecurrentILMMode(ClusterState state) Returns the current ILM mode based on the given cluster state.static OperationModecurrentSLMMode(ClusterState state) Returns the current ILM mode based on the given cluster state.diff(Metadata.Custom previousState) booleaninthashCode()toString()Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunked, toXContentChunkedV8Methods inherited from interface org.elasticsearch.cluster.metadata.Metadata.Custom
isRestorable
-
Field Details
-
TYPE
- See Also:
-
ILM_OPERATION_MODE_FIELD
public static final org.elasticsearch.xcontent.ParseField ILM_OPERATION_MODE_FIELD -
SLM_OPERATION_MODE_FIELD
public static final org.elasticsearch.xcontent.ParseField SLM_OPERATION_MODE_FIELD -
EMPTY
-
PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<LifecycleOperationMetadata,Void> PARSER
-
-
Constructor Details
-
LifecycleOperationMetadata
-
LifecycleOperationMetadata
- Throws:
IOException
-
-
Method Details
-
currentILMMode
Returns the current ILM mode based on the given cluster state. It first checks the newer storage mechanism (getILMOperationMode()) before falling back toIndexLifecycleMetadata.getOperationMode(). If neither exist, the default value for an empty state is used. -
currentSLMMode
Returns the current ILM mode based on the given cluster state. It first checks the newer storage mechanism (getSLMOperationMode()) before falling back toSnapshotLifecycleMetadata.getOperationMode(). If neither exist, the default value for an empty state is used. -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getILMOperationMode
-
getSLMOperationMode
-
diff
- Specified by:
diffin interfaceDiffable<Metadata.Custom>
-
toXContentChunked
public Iterator<? extends org.elasticsearch.xcontent.ToXContent> toXContentChunked(org.elasticsearch.xcontent.ToXContent.Params params) - Specified by:
toXContentChunkedin interfaceChunkedToXContent
-
getMinimalSupportedVersion
- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
context
- Specified by:
contextin interfaceMetadata.Custom
-
hashCode
public int hashCode() -
equals
-
toString
-