Source:
public void restart() { if (!started.compareAndSet(false, true)) { throw new IllegalStateException("Can't (re)start an already running NioNetworking"); } if (logger.isFineEnabled()) { logger.fine("TcpIpConnectionManager configured with Non Blocking IO-threading model: " + inputThreadCount + " input threads and " + outputThreadCount + " output threads"); } logger.log(selectorMode != SELECT ? Level.INFO : FINE, "IO threads selector mode is " + selectorMode); publishFuture = metricsRegistry.scheduleAtFixedRate(new PublishAllTask(), 1, SECONDS, ProbeLevel.INFO); this.closeListenerExecutor = newSingleThreadExecutor(r -> { Thread t = new Thread(r); t.setName(threadNamePrefix + "-NioNetworking-closeListenerExecutor"); return t; }); NioThread[] inThreads = new NioThread[inputThreadCount]; for (int i = 0; i < inThreads.length; i++) { NioThread thread = new NioThread( createThreadPoolName(threadNamePrefix, "IO") + "in-" + i, loggingService.getLogger(NioThread.class), errorHandler, selectorMode, idleStrategy); thread.id = i; thread.setSelectorWorkaroundTest(selectorWorkaroundTest); inThreads[i] = thread; metricsRegistry.scanAndRegister(thread, "tcp.inputThread[" + thread.getName() + "]"); thread.start(); } this.inputThreads = inThreads; NioThread[] outThreads = new NioThread[outputThreadCount]; for (int i = 0; i < outThreads.length; i++) { NioThread thread = new NioThread( createThreadPoolName(threadNamePrefix, "IO") + "out-" + i, loggingService.getLogger(NioThread.class), errorHandler, selectorMode, idleStrategy); thread.id = i; thread.setSelectorWorkaroundTest(selectorWorkaroundTest); outThreads[i] = thread; metricsRegistry.scanAndRegister(thread, "tcp.outputThread[" + thread.getName() + "]"); thread.start(); } this.outputThreads = outThreads; startIOBalancer(); }

Target:
public void restart() { if (!started.compareAndSet(false, true)) { throw new IllegalStateException("Can't (re)start an already running NioNetworking"); } if (logger.isFineEnabled()) { logger.fine("TcpIpConnectionManager configured with Non Blocking IO-threading model: " + inputThreadCount + " input threads and " + outputThreadCount + " output threads"); logger.fine("write through enabled:" + writeThroughEnabled); } logger.log(selectorMode != SELECT ? Level.INFO : FINE, "IO threads selector mode is " + selectorMode); publishFuture = metricsRegistry.scheduleAtFixedRate(new PublishAllTask(), 1, SECONDS, ProbeLevel.INFO); this.closeListenerExecutor = newSingleThreadExecutor(r -> { Thread t = new Thread(r); t.setName(threadNamePrefix + "-NioNetworking-closeListenerExecutor"); return t; }); NioThread[] inThreads = new NioThread[inputThreadCount]; for (int i = 0; i < inThreads.length; i++) { NioThread thread = new NioThread( createThreadPoolName(threadNamePrefix, "IO") + "in-" + i, loggingService.getLogger(NioThread.class), errorHandler, selectorMode, idleStrategy); thread.id = i; thread.setSelectorWorkaroundTest(selectorWorkaroundTest); inThreads[i] = thread; metricsRegistry.scanAndRegister(thread, "tcp.inputThread[" + thread.getName() + "]"); thread.start(); } this.inputThreads = inThreads; NioThread[] outThreads = new NioThread[outputThreadCount]; for (int i = 0; i < outThreads.length; i++) { NioThread thread = new NioThread( createThreadPoolName(threadNamePrefix, "IO") + "out-" + i, loggingService.getLogger(NioThread.class), errorHandler, selectorMode, idleStrategy); thread.id = i; thread.setSelectorWorkaroundTest(selectorWorkaroundTest); outThreads[i] = thread; metricsRegistry.scanAndRegister(thread, "tcp.outputThread[" + thread.getName() + "]"); thread.start(); } this.outputThreads = outThreads; startIOBalancer(); }