Class AbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutor

  • All Implemented Interfaces:
    io.netty5.util.concurrent.EventExecutor, io.netty5.util.concurrent.EventExecutorGroup, io.netty5.util.concurrent.FuturePromiseFactory, Iterable<io.netty5.util.concurrent.EventExecutor>, Executor
    Enclosing class:
    AbstractSharedExecutorMicrobenchmark

    public static final class AbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutor
    extends io.netty5.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.netty5.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​(Thread thread)
      • shutdownGracefully

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

        public io.netty5.util.concurrent.Future<Void> terminationFuture()
      • 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 task)
      • newPromise

        public <V> io.netty5.util.concurrent.Promise<V> newPromise()
      • schedule

        public io.netty5.util.concurrent.Future<Void> schedule​(Runnable task,
                                                               long delay,
                                                               TimeUnit unit)
      • schedule

        public <V> io.netty5.util.concurrent.Future<V> schedule​(Callable<V> task,
                                                                long delay,
                                                                TimeUnit unit)
      • scheduleAtFixedRate

        public io.netty5.util.concurrent.Future<Void> scheduleAtFixedRate​(Runnable task,
                                                                          long initialDelay,
                                                                          long period,
                                                                          TimeUnit unit)
      • scheduleWithFixedDelay

        public io.netty5.util.concurrent.Future<Void> scheduleWithFixedDelay​(Runnable task,
                                                                             long initialDelay,
                                                                             long delay,
                                                                             TimeUnit unit)