// add 3 participants: "localhost:{12918, 12919, 12920}"
for (int i = 0; i < 3; i++)
{
int port = 12918 + i;
InstanceConfig config = new InstanceConfig("localhost_" + port);
config.setHostName("localhost");
config.setPort(Integer.toString(port));
config.setInstanceEnabled(true);
admin.addInstance(clusterName, config);
}
// add resource "TestDB" which has 4 partitions and uses MasterSlave state model
String resourceName = "TestDB";