Package io.netty5.microbench.util
Class AbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutor
- java.lang.Object
-
- io.netty5.util.concurrent.AbstractEventExecutor
-
- io.netty5.microbench.util.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.AbstractEventExecutorThis executor allows Netty and JMH to share a common executor. This is achieved by usingexecutor(EventLoop)with theEventLoopused by Netty.
-
-
Constructor Summary
Constructors Constructor Description DelegateHarnessExecutor(int maxThreads, String prefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long timeout, TimeUnit unit)voidexecute(Runnable task)static voidexecutor(io.netty5.channel.EventLoop service)Set the executor (in the form of anEventLoop) which JMH will use.booleaninEventLoop(Thread thread)booleanisShutdown()booleanisShuttingDown()booleanisTerminated()<V> io.netty5.util.concurrent.Promise<V>newPromise()io.netty5.util.concurrent.Future<Void>schedule(Runnable task, long delay, TimeUnit unit)<V> io.netty5.util.concurrent.Future<V>schedule(Callable<V> task, long delay, TimeUnit unit)io.netty5.util.concurrent.Future<Void>scheduleAtFixedRate(Runnable task, long initialDelay, long period, TimeUnit unit)io.netty5.util.concurrent.Future<Void>scheduleWithFixedDelay(Runnable task, long initialDelay, long delay, TimeUnit unit)io.netty5.util.concurrent.Future<Void>shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)io.netty5.util.concurrent.Future<Void>terminationFuture()-
Methods inherited from class io.netty5.util.concurrent.AbstractEventExecutor
newSucceededFuture, newTaskFor, newTaskFor, submit, submit, submit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.util.concurrent.EventExecutor
inEventLoop, iterator, newFailedFuture, next
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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 anEventLoop) 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)
-
-