use of tezc.base.transport.TlsConfig in project tezcRaft by tezc.
the class App method start.
public void start(List<State> states, String name) throws IOException {
TlsConfig tlsConfig = new TlsConfig(null, null, null, null, null, null, null, null, null, null);
Config config = new Config();
config.setLogLevel("DEBUG");
config.setTlsConfig(tlsConfig);
Tezc tezc = new Tezc("./cluster1/" + name, this, config);
RaftCluster cluster = tezc.openCluster("cluster1", states);
if (!cluster.isStarted()) {
NodeRecord nodeRecord1 = new NodeRecord("node0", "group0");
nodeRecord1.addTransport(new TransportRecord("tcp", "127.0.0.1", 9090));
/*NodeRecord nodeRecord2 = new NodeRecord("node1", "group0");
nodeRecord2.addTransport(new TransportRecord("tcp", "127.0.0.1", 9091));
NodeRecord nodeRecord3 = new NodeRecord("node2", "group1");
nodeRecord3.addTransport(new TransportRecord("tcp", "127.0.0.1", 9092));*/
cluster.setLocal(Integer.parseInt(name));
cluster.addNode(nodeRecord1);
// cluster.addNode(nodeRecord2);
// cluster.addNode(nodeRecord3);
}
cluster.run();
}
Aggregations