}
AutoscalePolicy policy =
PolicyManager.getInstance()
.getAutoscalePolicy(autoscalePolicyName);
DeploymentPolicy deploymentPolicy =
PolicyManager.getInstance()
.getDeploymentPolicy(deploymentPolicyName);
if (deploymentPolicy == null) {
String msg = "Deployment Policy is null. Policy name: " + deploymentPolicyName;
log.error(msg);
throw new PolicyValidationException(msg);
}
String clusterId = cluster.getClusterId();
LbClusterMonitor clusterMonitor =
new LbClusterMonitor(clusterId,
cluster.getServiceName(),
deploymentPolicy, policy);
// partition group = network partition context
for (PartitionGroup partitionGroup : deploymentPolicy.getPartitionGroups()) {
NetworkPartitionLbHolder networkPartitionLbHolder =
PartitionManager.getInstance()
.getNetworkPartitionLbHolder(partitionGroup.getId());
// PartitionManager.getInstance()