if (args.length == 0) {
System.out.println("Starting an in-memory repository");
System.out.println(uri + " -> [memory]");
kernels = new MicroKernel[] { new MicroKernelImpl() };
addServlets(new KernelNodeStore(kernels[0]), "");
} else if (args.length == 1) {
System.out.println("Starting a standalone repository");
System.out.println(uri + " -> " + args[0]);
kernels = new MicroKernel[] { new MicroKernelImpl(args[0]) };
addServlets(new KernelNodeStore(kernels[0]), "");
} else {
System.out.println("Starting a clustered repository");
kernels = new MicroKernel[args.length];
for (int i = 0; i < args.length; i++) {
// FIXME: Use a clustered MicroKernel implementation
System.out.println(uri + "/node" + i + "/ -> " + args[i]);
kernels[i] = new MicroKernelImpl(args[i]);
addServlets(new KernelNodeStore(kernels[i]), "/node" + i);
}
}
server = new Server(port);
server.setHandler(context);