- case ROUTEDRTC:
- List<InstanceIdentifier<?>> routeIid = new ArrayList<>();
- for (int i = 0; i < input.getNumServers().intValue(); i++) {
- GlobalBindingRTCServer server = new GlobalBindingRTCServer();
- RoutedRpcRegistration<RpcbenchPayloadService> routedReg =
- providerRegistry.addRoutedRpcImplementation(RpcbenchPayloadService.class, server);
-
- KeyedInstanceIdentifier<RpcRoute, RpcRouteKey> iid =
- InstanceIdentifier
- .create(RpcbenchRpcRoutes.class)
- .child(RpcRoute.class, new RpcRouteKey(Integer.toString(i)));
- routeIid.add(iid);
- routedReg.registerPath(NodeContext.class, iid);
- rpcRegs.add(routedReg);
- }
-
- client = new RoutedBindingRTClient(providerRegistry, input.getPayloadSize().intValue(), routeIid);
- break;
-
- case GLOBALRTC:
- client = new GlobalBindingRTCClient(providerRegistry, input.getPayloadSize().intValue());
- break;
-
- default:
- LOG.error("Unsupported server/client type {}", input.getOperation());
- throw new IllegalArgumentException("Unsupported server/client type" + input.getOperation());
+ case ROUTEDRTC:
+ List<InstanceIdentifier<?>> routeIid = new ArrayList<>();
+ for (int i = 0; i < input.getNumServers().intValue(); i++) {
+ routeIid.add(InstanceIdentifier.create(RpcbenchRpcRoutes.class)
+ .child(RpcRoute.class, new RpcRouteKey(Integer.toString(i))));
+ }
+
+ routed = new RoutedBindingRTCServer(providerRegistry, Set.copyOf(routeIid));
+ client = new RoutedBindingRTClient(consumerRegistry, input.getPayloadSize().intValue(), routeIid);
+ break;
+
+ case GLOBALRTC:
+ client = new GlobalBindingRTCClient(consumerRegistry, input.getPayloadSize().intValue());
+ break;
+
+ default:
+ LOG.error("Unsupported server/client type {}", input.getOperation());
+ throw new IllegalArgumentException("Unsupported server/client type" + input.getOperation());