use of org.corfudb.runtime.clients.SequencerClient in project CorfuDB by CorfuDB.
the class AbstractViewTest method getRouterFunction.
/** Function for obtaining a router, given a runtime and an endpoint.
*
* @param runtime The CorfuRuntime to obtain a router for.
* @param endpoint An endpoint string for the router.
* @return
*/
private IClientRouter getRouterFunction(CorfuRuntime runtime, String endpoint) {
runtimeRouterMap.putIfAbsent(runtime, new ConcurrentHashMap<>());
if (!endpoint.startsWith("test:")) {
throw new RuntimeException("Unsupported endpoint in test: " + endpoint);
}
return runtimeRouterMap.get(runtime).computeIfAbsent(endpoint, x -> {
TestClientRouter tcn = new TestClientRouter(testServerMap.get(endpoint).getServerRouter());
tcn.addClient(new BaseClient()).addClient(new SequencerClient()).addClient(new LayoutClient()).addClient(new LogUnitClient()).addClient(new ManagementClient());
return tcn;
});
}
Aggregations