ArrayList<IStoreClient<String,String>> unsyncStores =
new ArrayList<IStoreClient<String,String>>();
ArrayList<Short> nodeIds = new ArrayList<Short>();
ArrayList<Node> nodes = new ArrayList<Node>();
FloodlightModuleContext fmc = new FloodlightModuleContext();
ThreadPool tp = new ThreadPool();
int curPort = 6699;
String keyStorePath = new File(dbFolder.getRoot(),
"keystore.jceks").getAbsolutePath();
String keyStorePassword = "bootstrapping is fun!";
CryptoUtil.writeSharedSecret(keyStorePath,
keyStorePassword,
CryptoUtil.secureRandom(16));
// autobootstrap a cluster of 4 nodes
for (int i = 0; i < 4; i++) {
SyncManager syncManager = new SyncManager();
syncManagers.add(syncManager);
fmc.addService(IThreadPoolService.class, tp);
fmc.addService(IDebugCounterService.class, new NullDebugCounter());
String dbPath =
new File(dbFolder.getRoot(),
"server" + i).getAbsolutePath();
fmc.addConfigParam(syncManager, "dbPath", dbPath);
tp.init(fmc);
syncManager.init(fmc);
tp.startUp(fmc);
syncManager.startUp(fmc);