Class Decision.Single
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.Decision
org.elasticsearch.cluster.routing.allocation.decider.Decision.Single
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
- Enclosing class:
- Decision
public static class Decision.Single
extends Decision
implements org.elasticsearch.common.xcontent.ToXContentObject
Simple class representing a single decision
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.cluster.routing.allocation.decider.Decision
Decision.Multi, Decision.Single, Decision.TypeNested 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
Fields inherited from class org.elasticsearch.cluster.routing.allocation.decider.Decision
ALWAYS, NO, THROTTLE, YESFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionSingle(Decision.Type type, String label, String explanation, Object... explanationParams)Creates a newDecision.Singledecision of a given type -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the list of all decisions that make up this decisionReturns the explanation string, fully formatted.inthashCode()label()Get the description label for this decision.toString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)type()Get theDecision.Typeof this decisionvoidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.Decision
readFrom, singleMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
Single
public Single(Decision.Type type, @Nullable String label, @Nullable String explanation, @Nullable Object... explanationParams)Creates a newDecision.Singledecision of a given type- Parameters:
type-Decision.Typeof the decisionexplanation- An explanation of thisDecisionexplanationParams- A set of additional parameters
-
-
Method Details
-
type
Description copied from class:DecisionGet theDecision.Typeof this decision- Specified by:
typein classDecision- Returns:
Decision.Typeof this decision
-
label
Description copied from class:DecisionGet the description label for this decision. -
getDecisions
Description copied from class:DecisionReturn the list of all decisions that make up this decision- Specified by:
getDecisionsin classDecision
-
getExplanation
Returns the explanation string, fully formatted. Only formats the string once.- Specified by:
getExplanationin classDecision
-
equals
-
hashCode
public int hashCode() -
toString
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-