Interface EventExecutor
- All Superinterfaces:
EventExecutorGroup, Executor, ExecutorService, Iterable<EventExecutor>, ScheduledExecutorService
- All Known Subinterfaces:
EventLoop, OrderedEventExecutor
- All Known Implementing Classes:
AbstractEventExecutor, AbstractEventLoop, AbstractScheduledEventExecutor, DefaultEventExecutor, DefaultEventLoop, EpollEventLoop, GlobalEventExecutor, ImmediateEventExecutor, NioEventLoop, SingleThreadEventExecutor, SingleThreadEventLoop, ThreadPerChannelEventLoop, UnorderedThreadPoolEventExecutor
The
EventExecutor is a special EventExecutorGroup which comes
with some handy methods to see if a Thread is executed in a event loop.
Besides this, it also extends the EventExecutorGroup to allow for a generic
way to access methods.-
Method Summary
Modifier and TypeMethodDescriptionbooleanCallsinEventLoop(Thread)withThread.currentThread()as argumentbooleaninEventLoop(Thread thread) <V> Future<V> newFailedFuture(Throwable cause) Create a newFuturewhich is marked as failed already.<V> ProgressivePromise<V> Create a newProgressivePromise.<V> Promise<V> Return a newPromise.<V> Future<V> newSucceededFuture(V result) Create a newFuturewhich is marked as succeeded already.next()Returns a reference to itself.parent()Return theEventExecutorGroupwhich is the parent of thisEventExecutor,Methods inherited from interface EventExecutorGroup
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFutureMethods inherited from interface ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
next
EventExecutor next()Returns a reference to itself.- Specified by:
nextin interfaceEventExecutorGroup
-
parent
EventExecutorGroup parent()Return theEventExecutorGroupwhich is the parent of thisEventExecutor, -
inEventLoop
boolean inEventLoop()CallsinEventLoop(Thread)withThread.currentThread()as argument -
inEventLoop
-
newPromise
-
newProgressivePromise
Create a newProgressivePromise. -
newSucceededFuture
Create a newFuturewhich is marked as succeeded already. SoFuture.isSuccess()will returntrue. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking. -
newFailedFuture
Create a newFuturewhich is marked as failed already. SoFuture.isSuccess()will returnfalse. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking.
-