Writeable
, ToXContent
Decision.Multi
, Decision.Single
public abstract class Decision extends java.lang.Object implements ToXContent, Writeable
Decision
used during shard
allocation process.AllocationDecider
Modifier and Type | Class | Description |
---|---|---|
static class |
Decision.Multi |
Simple class representing a list of decisions
|
static class |
Decision.Single |
Simple class representing a single decision
|
static class |
Decision.Type |
This enumeration defines the
possible types of decisions
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static Decision |
ALWAYS |
|
static Decision |
NO |
|
static Decision |
THROTTLE |
|
static Decision |
YES |
EMPTY_PARAMS
Constructor | Description |
---|---|
Decision() |
Modifier and Type | Method | Description |
---|---|---|
abstract java.util.List<Decision> |
getDecisions() |
Return the list of all decisions that make up this decision
|
abstract java.lang.String |
getExplanation() |
Get the explanation for this decision.
|
abstract java.lang.String |
label() |
Get the description label for this decision.
|
static Decision |
readFrom(StreamInput in) |
|
static Decision |
single(Decision.Type type,
java.lang.String label,
java.lang.String explanation,
java.lang.Object... explanationParams) |
Creates a simple decision
|
abstract Decision.Type |
type() |
Get the
Decision.Type of this decision |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment, toXContent
public static final Decision ALWAYS
public static final Decision YES
public static final Decision NO
public static final Decision THROTTLE
public static Decision single(Decision.Type type, @Nullable java.lang.String label, @Nullable java.lang.String explanation, @Nullable java.lang.Object... explanationParams)
type
- Decision.Type
of the decisionlabel
- label for the Decider that produced this decisionexplanation
- explanation of the decisionexplanationParams
- additional parameters for the decisionDecision
instancepublic static Decision readFrom(StreamInput in) throws java.io.IOException
java.io.IOException
public abstract Decision.Type type()
Decision.Type
of this decisionDecision.Type
of this decision@Nullable public abstract java.lang.String label()
@Nullable public abstract java.lang.String getExplanation()
public abstract java.util.List<Decision> getDecisions()