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.Type
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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 class org.elasticsearch.cluster.routing.allocation.decider.Decision
ALWAYS, NO, THROTTLE, YES
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionSingle
(Decision.Type type, String label, String explanation, Object... explanationParams) Creates a newDecision.Single
decision of a given type -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the list of all decisions that make up this decisionReturns the explanation string, fully formatted.int
hashCode()
label()
Get the description label for this decision.toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) type()
Get theDecision.Type
of this decisionvoid
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.Decision
readFrom, single
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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.Single
decision of a given type- Parameters:
type
-Decision.Type
of the decisionexplanation
- An explanation of thisDecision
explanationParams
- A set of additional parameters
-
-
Method Details
-
type
Description copied from class:Decision
Get theDecision.Type
of this decision- Specified by:
type
in classDecision
- Returns:
Decision.Type
of this decision
-
label
Description copied from class:Decision
Get the description label for this decision. -
getDecisions
Description copied from class:Decision
Return the list of all decisions that make up this decision- Specified by:
getDecisions
in classDecision
-
getExplanation
Returns the explanation string, fully formatted. Only formats the string once.- Specified by:
getExplanation
in classDecision
-
equals
-
hashCode
public int hashCode() -
toString
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-