Class Decision
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.Decision
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent
- Direct Known Subclasses:
Decision.Multi,Decision.Single
public abstract class Decision
extends Object
implements org.elasticsearch.common.xcontent.ToXContent, Writeable
This abstract class defining basic
Decision used during shard
allocation process.- See Also:
AllocationDecider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple class representing a list of decisionsstatic classSimple class representing a single decisionstatic classThis enumeration defines the possible types of decisionsNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the list of all decisions that make up this decisionabstract StringGet the explanation for this decision.abstract Stringlabel()Get the description label for this decision.static DecisionreadFrom(StreamInput in)static Decisionsingle(Decision.Type type, String label, String explanation, Object... explanationParams)Creates a simple decisionabstract Decision.Typetype()Get theDecision.Typeof this decisionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContent
isFragment, toXContent
-
Field Details
-
ALWAYS
-
YES
-
NO
-
THROTTLE
-
-
Constructor Details
-
Decision
public Decision()
-
-
Method Details
-
single
public static Decision single(Decision.Type type, @Nullable String label, @Nullable String explanation, @Nullable 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
- Throws:
IOException
-
type
Get theDecision.Typeof this decision- Returns:
Decision.Typeof this decision
-
label
Get the description label for this decision. -
getExplanation
Get the explanation for this decision. -
getDecisions
Return the list of all decisions that make up this decision
-