log.debug("Starting Cache Manager initialization");
CacheConfiguration cacheConfiguration = CacheConfiguration.getInstance();
// Infinispan requires the bind.address system property to be set to function as a
// distributed cache. This has been done in CarbonServerManager#initializeCarbon()
GlobalConfiguration globalConfiguration;
if (Boolean.toString(true).equals(
cacheConfiguration.getProperty("configuration.clustering.enabled"))) {
globalConfiguration = GlobalConfiguration.getClusteredDefault();
String clusterName =
cacheConfiguration.getProperty("configuration.clustering.clusterName");
if (clusterName != null) {
globalConfiguration.setClusterName(clusterName);
} else {
globalConfiguration.setClusterName(DEFAULT_CLUSTER_NAME);
}
} else {
globalConfiguration = GlobalConfiguration.getNonClusteredDefault();
}
String ec2ConfigFile = cacheConfiguration.getProperty("configuration.ec2.configFile");
if (ec2ConfigFile != null) {
Properties props = new Properties();
props.setProperty("configurationFile", ec2ConfigFile.replace("${carbon.home}",
carbonHome));
globalConfiguration.setTransportProperties(props);
}
globalConfiguration.setAllowDuplicateDomains(true);
Configuration configuration = new Configuration();
String cacheMode = cacheConfiguration.getProperty("configuration.cacheMode");
boolean sync = Boolean.toString(true).equals(