Class Decision
- java.lang.Object
-
- org.elasticsearch.cluster.routing.allocation.decider.Decision
-
- All Implemented Interfaces:
Writeable,ToXContent
- Direct Known Subclasses:
Decision.Multi,Decision.Single
public abstract class Decision extends java.lang.Object implements ToXContent, Writeable
This abstract class defining basicDecisionused during shard allocation process.- See Also:
AllocationDecider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDecision.MultiSimple class representing a list of decisionsstatic classDecision.SingleSimple class representing a single decisionstatic classDecision.TypeThis enumeration defines the possible types of decisions-
Nested classes/interfaces inherited from interface org.elasticsearch.common.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 Modifier and Type Field Description static DecisionALWAYSstatic DecisionNOstatic DecisionTHROTTLEstatic DecisionYES-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description Decision()
-
Method Summary
Modifier and Type Method Description abstract java.util.List<Decision>getDecisions()Return the list of all decisions that make up this decisionabstract java.lang.StringgetExplanation()Get the explanation for this decision.abstract java.lang.Stringlabel()Get the description label for this decision.static DecisionreadFrom(StreamInput in)static Decisionsingle(Decision.Type type, java.lang.String label, java.lang.String explanation, java.lang.Object... explanationParams)Creates a simple decisionabstract Decision.Typetype()Get theDecision.Typeof this decision-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment, toXContent
-
-
-
-
Method Detail
-
single
public static Decision single(Decision.Type type, @Nullable java.lang.String label, @Nullable java.lang.String explanation, @Nullable java.lang.Object... explanationParams)
Creates a simple decision- Parameters:
type-Decision.Typeof the decisionlabel- label for the Decider that produced this decisionexplanation- explanation of the decisionexplanationParams- additional parameters for the decision- Returns:
- new
Decisioninstance
-
readFrom
public static Decision readFrom(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
type
public abstract Decision.Type type()
Get theDecision.Typeof this decision- Returns:
Decision.Typeof this decision
-
label
@Nullable public abstract java.lang.String label()
Get the description label for this decision.
-
getExplanation
@Nullable public abstract java.lang.String getExplanation()
Get the explanation for this decision.
-
getDecisions
public abstract java.util.List<Decision> getDecisions()
Return the list of all decisions that make up this decision
-
-