Package io.netty.microbench.util
Class AbstractSharedExecutorMicrobenchmark.DelegateHarnessExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- io.netty.util.concurrent.AbstractEventExecutor
-
- io.netty.microbench.util.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.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 Deprecated Methods Modifier and Type Method Description booleanawaitTermination(long timeout, TimeUnit unit)voidexecute(Runnable command)static voidexecutor(io.netty.channel.EventLoop service)Set the executor (in the form of anEventLoop) which JMH will use.booleaninEventLoop()booleaninEventLoop(Thread thread)booleanisShutdown()booleanisShuttingDown()booleanisTerminated()<V> io.netty.util.concurrent.ProgressivePromise<V>newProgressivePromise()<V> io.netty.util.concurrent.Promise<V>newPromise()voidshutdown()Deprecated.io.netty.util.concurrent.Future<?>shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)io.netty.util.concurrent.Future<?>terminationFuture()-
Methods inherited from class io.netty.util.concurrent.AbstractEventExecutor
iterator, lazyExecute, newTaskFor, newTaskFor, next, parent, runTask, safeExecute, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdownGracefully, shutdownNow, submit, submit, submit
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.util.concurrent.EventExecutor
isExecutorThread, isSuspended, newFailedFuture, newSucceededFuture, trySuspend
-
Methods inherited from interface java.util.concurrent.ExecutorService
invokeAll, invokeAll, invokeAny, invokeAny
-
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.netty.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()
-
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:
shutdownin interfaceio.netty.util.concurrent.EventExecutorGroup- Specified by:
shutdownin interfaceExecutorService- Specified by:
shutdownin classio.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()
-
-