Class LifecyclePolicy
- java.lang.Object
-
- org.elasticsearch.client.indexlifecycle.LifecyclePolicy
-
- All Implemented Interfaces:
ToXContent,ToXContentObject
public class LifecyclePolicy extends Object implements ToXContentObject
Represents the lifecycle of an index from creation to deletion. ALifecyclePolicyis made up of a set ofPhases which it will move through.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
Fields Modifier and Type Field Description static ConstructingObjectParser<LifecyclePolicy,String>PARSER-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description LifecyclePolicy(String name, Map<String,Phase> phases)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetName()Map<String,Phase>getPhases()inthashCode()static LifecyclePolicyparse(XContentParser parser, String name)StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
PARSER
public static ConstructingObjectParser<LifecyclePolicy,String> PARSER
-
-
Constructor Detail
-
LifecyclePolicy
public LifecyclePolicy(String name, Map<String,Phase> phases)
- Parameters:
name- the name of thisLifecyclePolicyphases- aMapofPhases which make up thisLifecyclePolicy.
-
-
Method Detail
-
parse
public static LifecyclePolicy parse(XContentParser parser, String name)
-
getName
public String getName()
- Returns:
- the name of this
LifecyclePolicy
-
getPhases
public Map<String,Phase> getPhases()
- Returns:
- the
Phases for thisLifecyclePolicyin the order in which they will be executed.
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
-