public static EventLoopGroup createEventLoop(IOMode mode, int numThreads, String threadPrefix) {
    ThreadFactory threadFactory = createThreadFactory(threadPrefix);

    switch (mode) {
      case NIO:
        return new NioEventLoopGroup(numThreads, threadFactory);
      case EPOLL:
        return new EpollEventLoopGroup(numThreads, threadFactory);
      default:
        throw new IllegalArgumentException("Unknown io mode: " + mode);
    }
  }
public static EventLoopGroup createEventLoop ( IOMode mode , int numThreads , String threadPrefix ) { ThreadFactory threadFactory = createThreadFactory ( threadPrefix ) ; switch ( mode ) { case NIO : return new NioEventLoopGroup ( numThreads , threadFactory ) ; case EPOLL : return new EpollEventLoopGroup ( numThreads , threadFactory ) ; default : throw new IllegalArgumentException ( "Unknown io mode: " + mode ) ; } }
Creates a Netty EventLoopGroup based on the IOMode.