Home / Function/ EventExecutor() — netty Function Reference

EventExecutor() — netty Function Reference

Architecture documentation for the EventExecutor() function in DefaultChannelPipeline.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  377e0ed3_6041_b33d_69d8_e0cc1d1401dc["EventExecutor()"]
  12185bde_01b4_fad0_496c_1d27b952b797["DefaultChannelPipeline"]
  377e0ed3_6041_b33d_69d8_e0cc1d1401dc -->|defined in| 12185bde_01b4_fad0_496c_1d27b952b797
  style 377e0ed3_6041_b33d_69d8_e0cc1d1401dc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java lines 122–143

    private EventExecutor childExecutor(EventExecutorGroup group) {
        if (group == null) {
            return null;
        }
        Boolean pinEventExecutor = channel.config().getOption(ChannelOption.SINGLE_EVENTEXECUTOR_PER_GROUP);
        if (pinEventExecutor != null && !pinEventExecutor) {
            return group.next();
        }
        Map<EventExecutorGroup, EventExecutor> childExecutors = this.childExecutors;
        if (childExecutors == null) {
            // Use size of 4 as most people only use one extra EventExecutor.
            childExecutors = this.childExecutors = new IdentityHashMap<EventExecutorGroup, EventExecutor>(4);
        }
        // Pin one of the child executors once and remember it so that the same child executor
        // is used to fire events for the same channel.
        EventExecutor childExecutor = childExecutors.get(group);
        if (childExecutor == null) {
            childExecutor = group.next();
            childExecutors.put(group, childExecutor);
        }
        return childExecutor;
    }

Domain

Subdomains

Frequently Asked Questions

What does EventExecutor() do?
EventExecutor() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java.
Where is EventExecutor() defined?
EventExecutor() is defined in transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java at line 122.

Analyze Your Own Codebase

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

Try Supermodel Free