Class AbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutor

  • All Implemented Interfaces:
    io.netty.util.concurrent.EventExecutor, io.netty.util.concurrent.EventExecutorGroup, io.netty.util.concurrent.ThreadAwareExecutor, Iterable<io.netty.util.concurrent.EventExecutor>, Executor, ExecutorService, ScheduledExecutorService
    Enclosing class:
    AbstractSharedExecutorMicrobenchmark

    public static final class AbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutor
    extends io.netty.util.concurrent.AbstractEventExecutor
    This executor allows Netty and JMH to share a common executor. This is achieved by using executor(EventLoop) with the EventLoop used by Netty.
    • Constructor Detail

      • DelegateHarnessExecutor

        public DelegateHarnessExecutor​(int maxThreads,
                                       String prefix)
    • Method Detail

      • executor

        public static void executor​(io.netty.channel.EventLoop service)
        Set the executor (in the form of an EventLoop) which JMH will use.

        This must be called before JMH requires an executor to execute objects.

        Parameters:
        service - Used as an executor by JMH to run benchmarks.
      • inEventLoop

        public boolean inEventLoop()
      • inEventLoop

        public boolean inEventLoop​(Thread thread)
      • shutdownGracefully

        public io.netty.util.concurrent.Future<?> shutdownGracefully​(long quietPeriod,
                                                                     long timeout,
                                                                     TimeUnit unit)
      • terminationFuture

        public io.netty.util.concurrent.Future<?> terminationFuture()
      • shutdown

        @Deprecated
        public void shutdown()
        Deprecated.
        Specified by:
        shutdown in interface io.netty.util.concurrent.EventExecutorGroup
        Specified by:
        shutdown in interface ExecutorService
        Specified by:
        shutdown in class io.netty.util.concurrent.AbstractEventExecutor
      • isShuttingDown

        public boolean isShuttingDown()
      • isShutdown

        public boolean isShutdown()
      • isTerminated

        public boolean isTerminated()
      • awaitTermination

        public boolean awaitTermination​(long timeout,
                                        TimeUnit unit)
      • execute

        public void execute​(Runnable command)
      • newPromise

        public <V> io.netty.util.concurrent.Promise<V> newPromise()
      • newProgressivePromise

        public <V> io.netty.util.concurrent.ProgressivePromise<V> newProgressivePromise()