Home / Class/ SingleThreadEventLoopA Class — netty Architecture

SingleThreadEventLoopA Class — netty Architecture

Architecture documentation for the SingleThreadEventLoopA class in SingleThreadEventLoopTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  08d65fbb_5c91_c129_ccd6_c146bc1b0c0d["SingleThreadEventLoopA"]
  220c0306_7851_92da_39e2_f00ceff58693["SingleThreadEventLoopTest.java"]
  08d65fbb_5c91_c129_ccd6_c146bc1b0c0d -->|defined in| 220c0306_7851_92da_39e2_f00ceff58693
  94cb418c_6bac_dd76_1278_efeece6458bf["SingleThreadEventLoopA()"]
  08d65fbb_5c91_c129_ccd6_c146bc1b0c0d -->|method| 94cb418c_6bac_dd76_1278_efeece6458bf
  b79014df_fa4d_f5ee_0fee_b9e3906bd3e9["run()"]
  08d65fbb_5c91_c129_ccd6_c146bc1b0c0d -->|method| b79014df_fa4d_f5ee_0fee_b9e3906bd3e9
  2bf74b08_ab54_df61_7760_021e6b459f75["cleanup()"]
  08d65fbb_5c91_c129_ccd6_c146bc1b0c0d -->|method| 2bf74b08_ab54_df61_7760_021e6b459f75

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java lines 516–543

    private static final class SingleThreadEventLoopA extends SingleThreadEventLoop {

        final AtomicInteger cleanedUp = new AtomicInteger();

        SingleThreadEventLoopA() {
            super(null, Executors.defaultThreadFactory(), true);
        }

        @Override
        protected void run() {
            for (;;) {
                Runnable task = takeTask();
                if (task != null) {
                    task.run();
                    updateLastExecutionTime();
                }

                if (confirmShutdown()) {
                    break;
                }
            }
        }

        @Override
        protected void cleanup() {
            cleanedUp.incrementAndGet();
        }
    }

Frequently Asked Questions

What is the SingleThreadEventLoopA class?
SingleThreadEventLoopA is a class in the netty codebase, defined in transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java.
Where is SingleThreadEventLoopA defined?
SingleThreadEventLoopA is defined in transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java at line 516.

Analyze Your Own Codebase

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

Try Supermodel Free