static NIOServerCnxn.Factory createNewServerInstance(File dataDir,
NIOServerCnxn.Factory factory, String hostPort, int maxCnxns)
throws IOException, InterruptedException
{
ZooKeeperServer zks = new ZooKeeperServer(dataDir, dataDir, 3000);
final int PORT = getPort(hostPort);
if (factory == null) {
factory = new NIOServerCnxn.Factory(PORT,maxCnxns);
}
factory.startup(zks);