public final class NodeRebalanceResult
extends java.lang.Object
Constructor and Description |
---|
NodeRebalanceResult(Decision.Type nodeDecisionType,
Decision canAllocate,
boolean betterWeightThanCurrent,
boolean deltaAboveThreshold,
float currentWeight,
float weightWithShardAdded) |
Modifier and Type | Method and Description |
---|---|
Decision |
getCanAllocateDecision()
Returns whether the shard is allowed to be allocated to the node.
|
float |
getCurrentWeight()
Returns the current weight of the node if the shard is not added to the node.
|
Decision.Type |
getNodeDecisionType()
Returns the decision to rebalance to the node.
|
float |
getWeightWithShardAdded()
Returns the weight of the node if the shard is added to the node.
|
boolean |
isBetterWeightThanCurrent()
Returns whether the weight of the node is better than the weight of the node where the shard currently resides.
|
boolean |
isDeltaAboveThreshold()
Returns if the weight delta by assigning to this node was above the threshold to warrant a rebalance.
|
public NodeRebalanceResult(Decision.Type nodeDecisionType, Decision canAllocate, boolean betterWeightThanCurrent, boolean deltaAboveThreshold, float currentWeight, float weightWithShardAdded)
public Decision.Type getNodeDecisionType()
public Decision getCanAllocateDecision()
public boolean isBetterWeightThanCurrent()
public boolean isDeltaAboveThreshold()
public float getCurrentWeight()
public float getWeightWithShardAdded()