code: public static EventLoopGroup createEventLoop(ChannelType type, int numThreads,
        String threadPrefix, boolean isDaemon) {
      ThreadFactory threadFactory = ThreadFactoryUtils.build(threadPrefix, isDaemon);
  
      switch (type) {
        case NIO:
          return new NioEventLoopGroup(numThreads, threadFactory);
        case EPOLL:
          return new EpollEventLoopGroup(numThreads, threadFactory);
        default:
          throw new IllegalArgumentException("Unknown io type: " + type);
      }
    }
docs: Creates a Netty {@link EventLoopGroup} based on {@link ChannelType}.
  
  @param type Selector for which form of low-level IO we should use
  @param numThreads target number of threads
  @param threadPrefix name pattern for each thread. should contain '%d' to distinguish between
  threads.
  @param isDaemon if true, the {@link java.util.concurrent.ThreadFactory} will create daemon
  threads.
  @return EventLoopGroup matching the ChannelType