Module org.elasticsearch.server
Interface Decision
- All Superinterfaces:
ToXContent,Writeable
- All Known Implementing Classes:
Decision.Multi,Decision.Single
public sealed interface Decision
extends ToXContent, Writeable
permits Decision.Single, Decision.Multi
A
Decision used during shard allocation process.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordSimple class representing a list of decisionsstatic final recordSimple class representing a single decisionstatic enumThis enumeration defines the possible types of decisionsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Decision.Singlestatic final Decision.Singlestatic final Decision.Singlestatic final Decision.SingleFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionReturn the list of all decisions that make up this decisionGet the explanation for this decision.label()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 decisiontype()Get theDecision.Typeof this decisionMethods inherited from interface org.elasticsearch.xcontent.ToXContent
isFragment, toXContent
-
Field Details
-
ALWAYS
-
YES
-
NO
-
THROTTLE
-
-
Method Details
-
single
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
Decision.Type 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
-