Class Decision.Single
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.Type
Nested 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.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.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionSingle(Decision.Type type, label, explanation, ... explanationParams)
Creates a newDecision.Single
decision of a given type -
Method Summary
Modifier and TypeMethodDescriptionboolean
object)
<Decision>
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()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.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.
, , , , , , ,
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
Single
public Single(Decision.Type type, @Nullable label, @Nullable explanation, @Nullable ... 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
@Nullable public 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
@Nullable public getExplanation()Returns the explanation string, fully formatted. Only formats the string once.- Specified by:
getExplanation
in classDecision
-
equals
public boolean equals( object)- Overrides:
in class
-
hashCode
public int hashCode()- Overrides:
in class
-
toString
public toString()- Overrides:
in class
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.
-