public AbstractNioProcessor(NioHandler eventHandler, ChannelInitializer channelInitializer) { this.eventHandler = eventHandler; this.executor = Executors.newFixedThreadPool(Constants.AVAILABLE_PROCESSOR, new NamedThreadFactory("NioProcessorExecutor", true)); this.selectorLoop = new NioSelectorLoop("AcceptSelectorLoop-I/O", this); // this.readWriteSelectorPool = new FixedNioSelectorLoopPool(Constants.AVAILABLE_PROCESSOR + 1, "Server", this); this.idleDetector = new IdleDetector(); this.channelInitializer = channelInitializer; this.idleDetector.start(); }
@Override public void operationComplete(Future future) throws Exception { removeChannel(((Futures.CloseFuture) future).channel()); } });
this.idleDetector.addChannel(channel);
this.idleDetector.addChannel(channel);
public AbstractNioProcessor(NioHandler eventHandler, ChannelInitializer channelInitializer) { this.eventHandler = eventHandler; this.executor = Executors.newFixedThreadPool(Constants.AVAILABLE_PROCESSOR, new NamedThreadFactory("NioProcessorExecutor", true)); this.selectorLoop = new NioSelectorLoop("AcceptSelectorLoop-I/O", this); // this.readWriteSelectorPool = new FixedNioSelectorLoopPool(Constants.AVAILABLE_PROCESSOR + 1, "Server", this); this.idleDetector = new IdleDetector(); this.channelInitializer = channelInitializer; this.idleDetector.start(); }
idleDetector.addChannel(channel); connectFuture.setSuccess(true); connectFuture.setChannel(channel);
@Override public void operationComplete(Future future) throws Exception { removeChannel(((Futures.CloseFuture) future).channel()); } });
public AbstractNioProcessor(NioHandler eventHandler, ChannelInitializer channelInitializer) { this.eventHandler = eventHandler; this.executor = Executors.newFixedThreadPool(Constants.AVAILABLE_PROCESSOR, new NamedThreadFactory("NioProcessorExecutor", true)); this.selectorLoop = new NioSelectorLoop("AcceptSelectorLoop-I/O", this); // this.readWriteSelectorPool = new FixedNioSelectorLoopPool(Constants.AVAILABLE_PROCESSOR + 1, "Server", this); this.idleDetector = new IdleDetector(); this.channelInitializer = channelInitializer; this.idleDetector.start(); }
idleDetector.addChannel(channel); connectFuture.setSuccess(true); connectFuture.setChannel(channel);
@Override public void operationComplete(Future future) throws Exception { removeChannel(((Futures.CloseFuture) future).channel()); } });
this.idleDetector.addChannel(channel);
idleDetector.addChannel(channel); connectFuture.setSuccess(true); connectFuture.setChannel(channel);