java.lang.Object
org.elasticsearch.cluster.metadata.DataLifecycle
- All Implemented Interfaces:
Diffable<DataLifecycle>
,SimpleDiffable<DataLifecycle>
,Writeable
,ToXContent
,ToXContentObject
public class DataLifecycle
extends Object
implements SimpleDiffable<DataLifecycle>, ToXContentObject
Holds the Data Lifecycle Management metadata that are configuring how a data stream is managed.
-
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
Modifier and TypeFieldDescriptionstatic final Setting<RolloverConfiguration>
static final ParseField
static final String
static final DataLifecycle
static final ConstructingObjectParser<DataLifecycle,
Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static DataLifecycle
fromXContent
(XContentParser parser) int
hashCode()
static boolean
static Diff<DataLifecycle>
toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) toXContent
(XContentBuilder builder, ToXContent.Params params, RolloverConfiguration rolloverConfiguration) Converts the data lifecycle to XContent and injects the RolloverConditions if they exist.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diff
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
CLUSTER_DLM_DEFAULT_ROLLOVER_SETTING
-
EMPTY
-
DLM_ORIGIN
- See Also:
-
DATA_RETENTION_FIELD
-
PARSER
-
-
Constructor Details
-
DataLifecycle
public DataLifecycle() -
DataLifecycle
-
DataLifecycle
public DataLifecycle(long timeInMills) -
DataLifecycle
- Throws:
IOException
-
-
Method Details
-
isEnabled
public static boolean isEnabled() -
getDataRetention
-
equals
-
hashCode
public int hashCode() -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
toString
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params, @Nullable RolloverConfiguration rolloverConfiguration) throws IOException Converts the data lifecycle to XContent and injects the RolloverConditions if they exist.- Throws:
IOException
-
fromXContent
- Throws:
IOException
-