Home / Class/ FastThreadLocalRunnable Class — netty Architecture

FastThreadLocalRunnable Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  67dca608_f086_cce3_b298_cdc76e182b08["FastThreadLocalRunnable"]
  01692fca_8bd2_3bfd_fd39_c4f22ae9e53d["FastThreadLocalRunnable.java"]
  67dca608_f086_cce3_b298_cdc76e182b08 -->|defined in| 01692fca_8bd2_3bfd_fd39_c4f22ae9e53d
  f0074fdb_68b5_3268_21e5_a06fe77c9d3f["FastThreadLocalRunnable()"]
  67dca608_f086_cce3_b298_cdc76e182b08 -->|method| f0074fdb_68b5_3268_21e5_a06fe77c9d3f
  d9911ac2_7114_e01b_ed9a_9ad44206ba47["run()"]
  67dca608_f086_cce3_b298_cdc76e182b08 -->|method| d9911ac2_7114_e01b_ed9a_9ad44206ba47
  a1831c8d_b5b1_e810_1610_ddb8f811118c["Runnable()"]
  67dca608_f086_cce3_b298_cdc76e182b08 -->|method| a1831c8d_b5b1_e810_1610_ddb8f811118c

Relationship Graph

Source Code

common/src/main/java/io/netty/util/concurrent/FastThreadLocalRunnable.java lines 20–39

final class FastThreadLocalRunnable implements Runnable {
    private final Runnable runnable;

    private FastThreadLocalRunnable(Runnable runnable) {
        this.runnable = ObjectUtil.checkNotNull(runnable, "runnable");
    }

    @Override
    public void run() {
        try {
            runnable.run();
        } finally {
            FastThreadLocal.removeAll();
        }
    }

    static Runnable wrap(Runnable runnable) {
        return runnable instanceof FastThreadLocalRunnable ? runnable : new FastThreadLocalRunnable(runnable);
    }
}

Frequently Asked Questions

What is the FastThreadLocalRunnable class?
FastThreadLocalRunnable is a class in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/FastThreadLocalRunnable.java.
Where is FastThreadLocalRunnable defined?
FastThreadLocalRunnable is defined in common/src/main/java/io/netty/util/concurrent/FastThreadLocalRunnable.java at line 20.

Analyze Your Own Codebase

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

Try Supermodel Free