public abstract class AbstractAcceptanceGoal extends AbstractGoal
Goal.actionAcceptance(BalancingAction, ClusterModel)
is the only
method that must be implemented.Constructor and Description |
---|
AbstractAcceptanceGoal() |
Modifier and Type | Method and Description |
---|---|
ModelCompletenessRequirements |
clusterModelCompletenessRequirements()
Return the model completeness requirements for this goal.
|
void |
finish()
Signal for finishing the process for rebalance or self-healing for this goal.
|
boolean |
isHardGoal()
True if this is a hard goal, false otherwise.
|
boolean |
partitionActionSelfSatisfied(ClusterModel clusterModel,
PartitionBalancingAction action)
Check if requirements of this goal are not violated if this partition action is applied
to the given cluster state, false otherwise.
|
boolean |
replicaActionSelfSatisfied(ClusterModel clusterModel,
ReplicaBalancingAction action)
This goal is always considered self-satisfied, since it can only be violated by other goals' actions
|
configure, name, optimize, selfSatisfied, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
actionAcceptance, canChangeReplicationFactor, clusterModelStatsComparator, optimize
partitionActionAcceptance, replicaActionAcceptance
public ModelCompletenessRequirements clusterModelCompletenessRequirements()
public void finish()
public boolean isHardGoal()
public boolean replicaActionSelfSatisfied(ClusterModel clusterModel, ReplicaBalancingAction action)
clusterModel
- The state of the cluster.action
- Action containing information about potential modification to the given cluster model.public boolean partitionActionSelfSatisfied(ClusterModel clusterModel, PartitionBalancingAction action)
GoalBalancingActionAcceptance
clusterModel
- The state of the cluster.action
- Action containing information about potential modification to the given cluster model.