Class Decision
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
implements org.elasticsearch.common.xcontent.ToXContent, Writeable
This abstract class defining basic
Decision
used during shard
allocation process.- See Also:
AllocationDecider
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Simple class representing a list of decisionsstatic class
Simple class representing a single decisionstatic class
This 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.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.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract <Decision>
Return the list of all decisions that make up this decisionabstract
Get the explanation for this decision.abstract
label()
Get the description label for this decision.static Decision
readFrom(StreamInput in)
static Decision
single(Decision.Type type, label, explanation, ... explanationParams)
Creates a simple decisionabstract Decision.Type
type()
Get theDecision.Type
of this decisionMethods inherited from class java.lang.
, , , , , , , , , ,
Methods 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 label, @Nullable explanation, @Nullable ... explanationParams)Creates a simple decision- Parameters:
type
-Decision.Type
of the decisionlabel
- label for the Decider that produced this decisionexplanation
- explanation of the decisionexplanationParams
- additional parameters for the decision- Returns:
- new
Decision
instance
-
readFrom
- Throws:
-
type
Get theDecision.Type
of this decision- Returns:
Decision.Type
of this decision
-
label
@Nullable public abstract label()Get the description label for this decision. -
getExplanation
@Nullable public abstract getExplanation()Get the explanation for this decision. -
getDecisions
Return the list of all decisions that make up this decision
-