protected FabricServer newFabricServer() throws Exception { return new FabricServer(getAddress(), getHandler(), getRpcConfig(), getAllocator(), getRegistry(), getEventLoop()); }
@Override public void start() throws Exception { allocator = bootstrapAllocator.newChildAllocator("fabric-allocator", reservationInBytes, maxAllocationInBytes); logger.info("fabric service has {} bytes reserved", reservationInBytes); eventLoop = TransportCheck.createEventLoopGroup(threadCount, "FABRIC-"); eventLoopCloseable = new EventLoopCloseable(eventLoop); registry = new ConnectionManagerRegistry(getRpcConfig(), eventLoop, allocator, handler, getSSLEngineFactory()); server = newFabricServer(); port = server.bind(initialPort, allowPortHunting); registry.setIdentity(FabricIdentity.newBuilder() .setAddress(address) .setPort(port) .build()); }