| 428 | |
| 429 | // Must call when epoll is available |
| 430 | private static Class<? extends ServerChannel> epollServerChannelType() { |
| 431 | try { |
| 432 | Class<? extends ServerChannel> serverSocketChannel = |
| 433 | Class |
| 434 | .forName("io.netty.channel.epoll.EpollServerSocketChannel") |
| 435 | .asSubclass(ServerChannel.class); |
| 436 | return serverSocketChannel; |
| 437 | } catch (ClassNotFoundException e) { |
| 438 | throw new RuntimeException("Cannot load EpollServerSocketChannel", e); |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | private static EventLoopGroup createEpollEventLoopGroup( |
| 443 | int parallelism, |