Source:
<code>private void initializeTransport() { EventExecutorChooserFactory chooserFactory; if (USE_LEASTCONNS_FOR_EVENTLOOPS.get()) { chooserFactory = new LeastConnsEventLoopChooserFactory(eventLoopGroupMetrics); } else { chooserFactory = DefaultEventExecutorChooserFactory.INSTANCE; } ThreadFactory workerThreadFactory = new CategorizedThreadFactory(name + "-ClientToZuulWorker"); Executor workerExecutor = new ThreadPerTaskExecutor(workerThreadFactory); Map<ChannelOption, Object> extraOptions = new HashMap<>(); <START> boolean useNio = forceNio.get(); <END> if (!useNio && epollIsAvailable()) { channelType = EpollServerSocketChannel.class; extraOptions.put(EpollChannelOption.TCP_DEFER_ACCEPT, Integer.valueOf(-1)); clientToProxyBossPool = new EpollEventLoopGroup( acceptorThreads, new CategorizedThreadFactory(name + "-ClientToZuulAcceptor")); clientToProxyWorkerPool = new EpollEventLoopGroup( workerThreads, workerExecutor, chooserFactory, DefaultSelectStrategyFactory.INSTANCE); } else if (!useNio && kqueueIsAvailable()) { channelType = KQueueServerSocketChannel.class; clientToProxyBossPool = new KQueueEventLoopGroup( acceptorThreads, new CategorizedThreadFactory(name + "-ClientToZuulAcceptor")); clientToProxyWorkerPool = new KQueueEventLoopGroup( workerThreads, workerExecutor, chooserFactory, DefaultSelectStrategyFactory.INSTANCE); } else { channelType = NioServerSocketChannel.class; NioEventLoopGroup elg = new NioEventLoopGroup( workerThreads, workerExecutor, chooserFactory, SelectorProvider.provider(), DefaultSelectStrategyFactory.INSTANCE ); elg.setIoRatio(90); clientToProxyBossPool = new NioEventLoopGroup( acceptorThreads, new CategorizedThreadFactory(name + "-ClientToZuulAcceptor")); clientToProxyWorkerPool = elg; } transportChannelOptions = Collections.unmodifiableMap(extraOptions); postEventLoopCreationHook(clientToProxyBossPool, clientToProxyWorkerPool); }</code><technical_language>Do want ability force other types? i.e. USE_EPOLL flag</technical_language>

Target:
private void initializeTransport() { EventExecutorChooserFactory chooserFactory; if (USE_LEASTCONNS_FOR_EVENTLOOPS.get()) { chooserFactory = new LeastConnsEventLoopChooserFactory(eventLoopGroupMetrics); } else { chooserFactory = DefaultEventExecutorChooserFactory.INSTANCE; } ThreadFactory workerThreadFactory = new CategorizedThreadFactory(name + "-ClientToZuulWorker"); Executor workerExecutor = new ThreadPerTaskExecutor(workerThreadFactory); Map<ChannelOption, Object> extraOptions = new HashMap<>(); boolean useNio = FORCE_NIO.get(); if (!useNio && epollIsAvailable()) { channelType = EpollServerSocketChannel.class; extraOptions.put(EpollChannelOption.TCP_DEFER_ACCEPT, -1); clientToProxyBossPool = new EpollEventLoopGroup( acceptorThreads, new CategorizedThreadFactory(name + "-ClientToZuulAcceptor")); clientToProxyWorkerPool = new EpollEventLoopGroup( workerThreads, workerExecutor, chooserFactory, DefaultSelectStrategyFactory.INSTANCE); } else if (!useNio && kqueueIsAvailable()) { channelType = KQueueServerSocketChannel.class; clientToProxyBossPool = new KQueueEventLoopGroup( acceptorThreads, new CategorizedThreadFactory(name + "-ClientToZuulAcceptor")); clientToProxyWorkerPool = new KQueueEventLoopGroup( workerThreads, workerExecutor, chooserFactory, DefaultSelectStrategyFactory.INSTANCE); } else { channelType = NioServerSocketChannel.class; NioEventLoopGroup elg = new NioEventLoopGroup( workerThreads, workerExecutor, chooserFactory, SelectorProvider.provider(), DefaultSelectStrategyFactory.INSTANCE ); elg.setIoRatio(90); clientToProxyBossPool = new NioEventLoopGroup( acceptorThreads, new CategorizedThreadFactory(name + "-ClientToZuulAcceptor")); clientToProxyWorkerPool = elg; } transportChannelOptions = Collections.unmodifiableMap(extraOptions); postEventLoopCreationHook(clientToProxyBossPool, clientToProxyWorkerPool); }