use of com.ctrip.framework.dal.cluster.client.config.ClusterConfigImpl in project dal by ctripcorp.
the class DummyDatabaseTest method setUp.
@Before
public void setUp() throws Exception {
clusterConfig = new ClusterConfigImpl("name", DatabaseCategory.CUSTOM, 12);
shardConfig = new DatabaseShardConfigImpl(clusterConfig, 0);
shardConfig.setMasterDomain(MASTER_DOMAIN);
shardConfig.setSlaveDomain(SLAVE_DOMAIN);
databaseConfig = new DatabaseConfigImpl(shardConfig);
dummyDatabase = new DummyDatabase(databaseConfig);
}
use of com.ctrip.framework.dal.cluster.client.config.ClusterConfigImpl in project dal by ctripcorp.
the class ClusterDataBaseAdapterTest method setUp.
@Before
public void setUp() throws Exception {
clusterConfig = new ClusterConfigImpl(CLUSTER_NAME, DatabaseCategory.CUSTOM, 12);
databaseShardConfig = new DatabaseShardConfigImpl(clusterConfig, 0);
databaseShardConfig.setMasterDomain(MASTER_DOMAIN);
databaseShardConfig.setSlaveDomain(SLAVE_DOMAIN);
databaseConfig = new DatabaseConfigImpl(databaseShardConfig);
databaseShardConfig.addDatabaseConfig(databaseConfig);
clusterConfig.addDatabaseShardConfig(databaseShardConfig);
cluster = clusterConfig.generate();
clusterDataBaseAdapter = new ClusterDataBaseAdapter(cluster);
}
Aggregations