Home / Class/ HarnessExecutor Class — netty Architecture

HarnessExecutor Class — netty Architecture

Architecture documentation for the HarnessExecutor class in AbstractMicrobenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  eb3ecb1d_b90c_6acb_9957_29d7b31ac030["HarnessExecutor"]
  74f9349e_1d3e_38ae_2f43_89a331a2c074["AbstractMicrobenchmark.java"]
  eb3ecb1d_b90c_6acb_9957_29d7b31ac030 -->|defined in| 74f9349e_1d3e_38ae_2f43_89a331a2c074
  38deadc8_b2a3_7442_f88a_864b3bdbbc59["HarnessExecutor()"]
  eb3ecb1d_b90c_6acb_9957_29d7b31ac030 -->|method| 38deadc8_b2a3_7442_f88a_864b3bdbbc59

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmark.java lines 48–105

    public static final class HarnessExecutor extends ThreadPoolExecutor {
        private static final InternalLogger logger = InternalLoggerFactory.getInstance(AbstractMicrobenchmark.class);

        public HarnessExecutor(int maxThreads, String prefix) {
            super(maxThreads, maxThreads, 0, TimeUnit.MILLISECONDS,
                    new LinkedBlockingQueue<Runnable>(),
                    new DefaultThreadFactory(prefix));
            EventExecutor eventExecutor = new AbstractEventExecutor() {
                @Override
                public void shutdown() {
                    throw new UnsupportedOperationException();
                }

                @Override
                public boolean inEventLoop(Thread thread) {
                    return thread instanceof FastThreadLocalThread;
                }

                @Override
                public boolean isShuttingDown() {
                    throw new UnsupportedOperationException();
                }

                @Override
                public Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit) {
                    throw new UnsupportedOperationException();
                }

                @Override
                public Future<?> terminationFuture() {
                    throw new UnsupportedOperationException();
                }

                @Override
                public boolean isShutdown() {
                    throw new UnsupportedOperationException();
                }

                @Override
                public boolean isTerminated() {
                    throw new UnsupportedOperationException();
                }

                @Override
                public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
                    throw new UnsupportedOperationException();
                }

                @Override
                public void execute(Runnable command) {
                    throw new UnsupportedOperationException();
                }
            };
            setThreadFactory(ThreadExecutorMap.apply(getThreadFactory(), eventExecutor));

            logger.debug("Using harness executor");
        }
    }

Frequently Asked Questions

What is the HarnessExecutor class?
HarnessExecutor is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmark.java.
Where is HarnessExecutor defined?
HarnessExecutor is defined in microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmark.java at line 48.

Analyze Your Own Codebase

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

Try Supermodel Free