Home / Class/ NioEventLoopGroup Class — netty Architecture

NioEventLoopGroup Class — netty Architecture

Architecture documentation for the NioEventLoopGroup class in NioEventLoopGroup.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  86d6005d_218c_8b2b_49dc_f52651ea34bf["NioEventLoopGroup"]
  51b34253_9046_80a9_3068_5b6253b2b051["NioEventLoopGroup.java"]
  86d6005d_218c_8b2b_49dc_f52651ea34bf -->|defined in| 51b34253_9046_80a9_3068_5b6253b2b051
  84873023_09c2_c058_b9ca_aad62d914781["NioEventLoopGroup()"]
  86d6005d_218c_8b2b_49dc_f52651ea34bf -->|method| 84873023_09c2_c058_b9ca_aad62d914781
  f7147502_fd24_1f69_3085_39abf8ceecc5["setIoRatio()"]
  86d6005d_218c_8b2b_49dc_f52651ea34bf -->|method| f7147502_fd24_1f69_3085_39abf8ceecc5
  5250bc4f_e19c_7db9_f1cf_b1b1f44bddd9["rebuildSelectors()"]
  86d6005d_218c_8b2b_49dc_f52651ea34bf -->|method| 5250bc4f_e19c_7db9_f1cf_b1b1f44bddd9
  02a3b124_a627_d97d_f4ae_43000cc61e3e["IoEventLoop()"]
  86d6005d_218c_8b2b_49dc_f52651ea34bf -->|method| 02a3b124_a627_d97d_f4ae_43000cc61e3e

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/nio/NioEventLoopGroup.java lines 44–195

@Deprecated
public class NioEventLoopGroup extends MultiThreadIoEventLoopGroup implements IoEventLoopGroup {

    private static final InternalLogger LOGGER = InternalLoggerFactory.getInstance(NioEventLoopGroup.class);

    /**
     * Create a new instance using the default number of threads, the default {@link ThreadFactory} and
     * the {@link SelectorProvider} which is returned by {@link SelectorProvider#provider()}.
     */
    public NioEventLoopGroup() {
        this(0);
    }

    /**
     * Create a new instance using the specified number of threads, {@link ThreadFactory} and the
     * {@link SelectorProvider} which is returned by {@link SelectorProvider#provider()}.
     */
    public NioEventLoopGroup(int nThreads) {
        this(nThreads, (Executor) null);
    }

    /**
     * Create a new instance using the default number of threads, the given {@link ThreadFactory} and the
     * {@link SelectorProvider} which is returned by {@link SelectorProvider#provider()}.
     */
    public NioEventLoopGroup(ThreadFactory threadFactory) {
        this(0, threadFactory, SelectorProvider.provider());
    }

    /**
     * Create a new instance using the specified number of threads, the given {@link ThreadFactory} and the
     * {@link SelectorProvider} which is returned by {@link SelectorProvider#provider()}.
     */
    public NioEventLoopGroup(int nThreads, ThreadFactory threadFactory) {
        this(nThreads, threadFactory, SelectorProvider.provider());
    }

    public NioEventLoopGroup(int nThreads, Executor executor) {
        this(nThreads, executor, SelectorProvider.provider());
    }

    /**
     * Create a new instance using the specified number of threads, the given {@link ThreadFactory} and the given
     * {@link SelectorProvider}.
     */
    public NioEventLoopGroup(
            int nThreads, ThreadFactory threadFactory, final SelectorProvider selectorProvider) {
        this(nThreads, threadFactory, selectorProvider, DefaultSelectStrategyFactory.INSTANCE);
    }

    public NioEventLoopGroup(int nThreads, ThreadFactory threadFactory,
        final SelectorProvider selectorProvider, final SelectStrategyFactory selectStrategyFactory) {
        super(nThreads, threadFactory, NioIoHandler.newFactory(selectorProvider, selectStrategyFactory),
                RejectedExecutionHandlers.reject());
    }

    public NioEventLoopGroup(
            int nThreads, Executor executor, final SelectorProvider selectorProvider) {
        this(nThreads, executor, selectorProvider, DefaultSelectStrategyFactory.INSTANCE);
    }

    public NioEventLoopGroup(int nThreads, Executor executor, final SelectorProvider selectorProvider,
                             final SelectStrategyFactory selectStrategyFactory) {
        super(nThreads, executor, NioIoHandler.newFactory(selectorProvider, selectStrategyFactory),
                RejectedExecutionHandlers.reject());
    }

    public NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory,
                             final SelectorProvider selectorProvider,
                             final SelectStrategyFactory selectStrategyFactory) {
        super(nThreads, executor, NioIoHandler.newFactory(selectorProvider, selectStrategyFactory), chooserFactory,
                RejectedExecutionHandlers.reject());
    }

    public NioEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory,
                             final SelectorProvider selectorProvider,
                             final SelectStrategyFactory selectStrategyFactory,
                             final RejectedExecutionHandler rejectedExecutionHandler) {
        super(nThreads, executor, NioIoHandler.newFactory(selectorProvider, selectStrategyFactory), chooserFactory,
                rejectedExecutionHandler);
    }

Frequently Asked Questions

What is the NioEventLoopGroup class?
NioEventLoopGroup is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/NioEventLoopGroup.java.
Where is NioEventLoopGroup defined?
NioEventLoopGroup is defined in transport/src/main/java/io/netty/channel/nio/NioEventLoopGroup.java at line 44.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free