Пример #1
0
 public ControlServer(
     ControlMessageHandler handler,
     BootStrapContext context,
     ConnectionManagerRegistry connectionRegistry) {
   super(
       ControlRpcConfig.getMapping(context.getConfig(), context.getExecutor()),
       context.getAllocator().getAsByteBufAllocator(),
       context.getBitLoopGroup());
   this.handler = handler;
   this.connectionRegistry = connectionRegistry;
   this.allocator = context.getAllocator();
 }
Пример #2
0
 public ServiceEngine(
     ControlMessageHandler controlMessageHandler,
     UserWorker userWorker,
     BootStrapContext context,
     WorkEventBus workBus,
     DataResponseHandler dataHandler,
     boolean allowPortHunting)
     throws DrillbitStartupException {
   final EventLoopGroup eventLoopGroup =
       TransportCheck.createEventLoopGroup(
           context.getConfig().getInt(ExecConstants.USER_SERVER_RPC_THREADS), "UserServer-");
   this.userServer =
       new UserServer(context.getConfig(), context.getAllocator(), eventLoopGroup, userWorker);
   this.controller = new ControllerImpl(context, controlMessageHandler, allowPortHunting);
   this.dataPool = new DataConnectionCreator(context, workBus, dataHandler, allowPortHunting);
   this.config = context.getConfig();
   this.allowPortHunting = allowPortHunting;
 }