RegistryManager registryManager = RegistryManager.getInstance();
String[] partitionsResourceList = (String[]) registryManager.retrieve(AutoScalerConstants.AUTOSCALER_RESOURCE +
AutoScalerConstants.NETWORK_PARTITION_LB_HOLDER_RESOURCE);
if (partitionsResourceList != null) {
NetworkPartitionLbHolder nwPartitionLbHolder;
for (String resourcePath : partitionsResourceList) {
Object serializedObj = registryManager.retrieve(resourcePath);
if (serializedObj != null) {
try {
Object dataObj = Deserializer.deserializeFromByteArray((byte[]) serializedObj);
if (dataObj instanceof NetworkPartitionLbHolder) {
nwPartitionLbHolder = (NetworkPartitionLbHolder) dataObj;
if(log.isDebugEnabled()) {
log.debug(String.format("NetworkPartitionLbHolder read from registry: " + nwPartitionLbHolder.toString()));
}
nwPartitionLbHolderList.add(nwPartitionLbHolder);
} else {
return null;
}