use of com.ctrip.platform.dal.dao.cluster.ClusterManagerImpl in project dal by ctripcorp.
the class DalConfigureFactory method readClusters.
private Map<String, DatabaseSet> readClusters(Node databaseSetsNode, DalConnectionLocator locator, DalConfigCustomizedOption defaultOption) throws Exception {
Map<String, DatabaseSet> databaseSets = new HashMap<>();
ClusterManager clusterManager = new ClusterManagerImpl(locator.getIntegratedConfigProvider());
List<Node> clusterList = getChildNodes(databaseSetsNode, CLUSTER);
for (Node node : clusterList) {
DalConfigCustomizedOption option = defaultOption.clone();
String name = getDatabaseSetName(node);
overrideDefaultConfig(node, option);
Cluster cluster = readCluster(node, clusterManager, option);
databaseSets.put(name, new ClusterDatabaseSet(name, cluster, locator, getSettings(node)));
}
return databaseSets;
}
Aggregations