public abstract class RelocationDecision
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
RelocationDecision(Decision.Type finalDecision,
java.lang.String finalExplanation,
java.lang.String assignedNodeId) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAssignedNodeId()
Get the node id that the allocator will assign the shard to, unless
getFinalDecisionType() returns
a value other than Decision.Type#YES , in which case this returns null . |
Decision.Type |
getFinalDecisionType()
Returns the final decision made by the allocator on whether to assign the shard, and
null if no decision was taken. |
java.lang.String |
getFinalExplanation()
Returns the free-text explanation for the reason behind the decision taken in
getFinalDecisionType() . |
boolean |
isDecisionTaken()
Returns
true if a decision was taken by the allocator, false otherwise. |
protected RelocationDecision(Decision.Type finalDecision, java.lang.String finalExplanation, java.lang.String assignedNodeId)
public boolean isDecisionTaken()
true
if a decision was taken by the allocator, false
otherwise.
If no decision was taken, then the rest of the fields in this object are meaningless and return null
.public Decision.Type getFinalDecisionType()
null
if no decision was taken.@Nullable public java.lang.String getFinalExplanation()
getFinalDecisionType()
.@Nullable public java.lang.String getAssignedNodeId()
getFinalDecisionType()
returns
a value other than Decision.Type#YES
, in which case this returns null
.