use of com.hazelcast.simulator.coordinator.CoordinatorParameters in project hazelcast-simulator by hazelcast.
the class Runner method newCoordinator.
private Coordinator newCoordinator() {
CoordinatorParameters parameters = new CoordinatorParameters().setSkipShutdownHook(true).setSimulatorProperties(options.simulatorProperties);
if (options.sessionId != null) {
parameters.setSessionId(options.sessionId);
}
Registry registry;
if ("local".equals(options.simulatorProperties.getCloudProvider())) {
registry = new Registry();
registry.addAgent("localhost", "localhost");
} else {
registry = loadComponentRegister(new File("agents.txt"));
}
Coordinator coordinator = new Coordinator(registry, parameters);
try {
coordinator.start();
} catch (Exception e) {
// todo
throw new RuntimeException(e);
}
return coordinator;
}
Aggregations