Module org.elasticsearch.server
Class RolloverConfiguration
java.lang.Object
org.elasticsearch.action.admin.indices.rollover.RolloverConfiguration
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
This class holds the configuration of the rollover conditions as they are defined in data stream lifecycle. Currently, it can handle
automatic configuration for the max index age condition.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Parses and keeps track of the condition values during parsingNested 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, EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionRolloverConfiguration
(RolloverConditions concreteConditions) RolloverConfiguration
(RolloverConditions concreteConditions, Set<String> automaticConditions) -
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluateAndConvertToXContent
(XContentBuilder builder, ToXContent.Params params, TimeValue retention) Evaluates the automatic conditions and converts the whole configuration to XContent.int
hashCode()
static RolloverConfiguration
parseSetting
(String input, String setting) Parses a cluster setting configuration, it expects it to have the following format: "condition1=value1,condition2=value2"resolveRolloverConditions
(TimeValue dataRetention) Evaluates all the automatic conditions based on the provided arguments.toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) 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.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
RolloverConfiguration
public RolloverConfiguration(RolloverConditions concreteConditions, Set<String> automaticConditions) -
RolloverConfiguration
-
RolloverConfiguration
- Throws:
IOException
-
-
Method Details
-
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
-
evaluateAndConvertToXContent
public XContentBuilder evaluateAndConvertToXContent(XContentBuilder builder, ToXContent.Params params, @Nullable TimeValue retention) throws IOException Evaluates the automatic conditions and converts the whole configuration to XContent. For the automatic conditions is also adds the suffix [automatic]- Throws:
IOException
-
resolveRolloverConditions
Evaluates all the automatic conditions based on the provided arguments. -
getConcreteConditions
-
getAutomaticConditions
-
parseSetting
Parses a cluster setting configuration, it expects it to have the following format: "condition1=value1,condition2=value2"- Throws:
SettingsException
- if the input is invalid, if there are unknown conditions or invalid format values.IllegalArgumentException
- if the input is null or blank.
-
equals
-
hashCode
public int hashCode() -
toString
-