接口 FixedEventLoopGroup

所有超级接口:
AutoCloseable, EventLoopGroup, Executor, ExecutorService, IExecutor, IExecutorService, IScheduledExecutorService, Iterable<EventLoop>, ScheduledExecutorService
所有已知子接口:
EventLoop
所有已知实现类:
AbstractEventLoop, DefaultFixedEventLoopGroup, DisruptorEventLoop

@ThreadSafe public interface FixedEventLoopGroup extends EventLoopGroup
固定数量EventLoop的事件循环线程组 它提供了相同key选择相同EventLoop的方法。
作者:
wjybxx date 2023/4/7
  • 方法详细资料

    • childCount

      int childCount()
      EventLoop的数量。
    • select

      @Nonnull EventLoop select(int key)
      通过一个键选择一个EventLoop 这提供了第二种绑定线程的方式,第一种方式是通过EventLoopGroup.select()分配一个线程,让业务对象持有EventLoop的引用。 现在,你可以为用户分配一个键,通过键建立虚拟绑定。
      参数:
      key - 计算索引的键;限定int可保证选择性能