Class Phase
- java.lang.Object
-
- org.elasticsearch.client.indexlifecycle.Phase
-
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public class Phase extends java.lang.Object implements ToXContentObject
Represents set ofLifecycleAction
s which should be executed at a particular point in the lifecycle of an index.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description Phase(java.lang.String name, TimeValue minimumAge, java.util.Map<java.lang.String,LifecycleAction> actions)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Map<java.lang.String,LifecycleAction>
getActions()
TimeValue
getMinimumAge()
java.lang.String
getName()
int
hashCode()
static Phase
parse(XContentParser parser, java.lang.String name)
java.lang.String
toString()
XContentBuilder
toXContent(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
-
-
-
-
Constructor Detail
-
Phase
public Phase(java.lang.String name, TimeValue minimumAge, java.util.Map<java.lang.String,LifecycleAction> actions)
- Parameters:
name
- the name of thisPhase
.minimumAge
- the age of the index when the index should move to thisPhase
.actions
- aMap
of theLifecycleAction
s to run when during thisPhase
. The keys in this map are the associated action names.
-
-
Method Detail
-
parse
public static Phase parse(XContentParser parser, java.lang.String name)
-
getMinimumAge
public TimeValue getMinimumAge()
- Returns:
- the age of the index when the index should move to this
Phase
.
-
getName
public java.lang.String getName()
- Returns:
- the name of this
Phase
-
getActions
public java.util.Map<java.lang.String,LifecycleAction> getActions()
- Returns:
- a
Map
of theLifecycleAction
s to run when during thisPhase
.
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-