Module org.elasticsearch.server
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,ToXContent,ToXContentObject
- Enclosing class:
Decision
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.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
Fields inherited from class org.elasticsearch.cluster.routing.allocation.decider.Decision
ALWAYS, NO, THROTTLE, YESFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, 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()toXContent(XContentBuilder builder, 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.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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-