use of org.apache.ignite.network.ClusterService in project ignite-3 by apache.
the class IgniteRpcTest method createServer.
/**
* {@inheritDoc}
*/
@Override
public RpcServer<?> createServer(Endpoint endpoint) {
ClusterService service = ClusterServiceTestUtils.clusterService(testInfo, endpoint.getPort(), new StaticNodeFinder(Collections.emptyList()), new TestScaleCubeClusterServiceFactory());
NodeOptions nodeOptions = new NodeOptions();
requestExecutor = JRaftUtils.createRequestExecutor(nodeOptions);
var server = new TestIgniteRpcServer(service, new NodeManager(), nodeOptions, requestExecutor) {
@Override
public void shutdown() {
super.shutdown();
service.stop();
}
};
service.start();
return server;
}
use of org.apache.ignite.network.ClusterService in project ignite-3 by apache.
the class IgniteRpcTest method createClient0.
/**
* {@inheritDoc}
*/
@Override
public RpcClient createClient0() {
int i = cntr.incrementAndGet();
ClusterService service = ClusterServiceTestUtils.clusterService(testInfo, endpoint.getPort() - i, new StaticNodeFinder(List.of(addressFromEndpoint(endpoint))), new TestScaleCubeClusterServiceFactory());
IgniteRpcClient client = new IgniteRpcClient(service) {
@Override
public void shutdown() {
super.shutdown();
service.stop();
}
};
service.start();
waitForTopology(client, 1 + i, 5_000);
return client;
}
Aggregations