Package io.netty.util.concurrent
Interface EventExecutor
-
- All Superinterfaces:
EventExecutorGroup,Executor,ExecutorService,Iterable<EventExecutor>,ScheduledExecutorService
- All Known Subinterfaces:
OrderedEventExecutor
- All Known Implementing Classes:
AbstractEventExecutor,AbstractScheduledEventExecutor,DefaultEventExecutor,GlobalEventExecutor,ImmediateEventExecutor,SingleThreadEventExecutor,UnorderedThreadPoolEventExecutor
public interface EventExecutor extends EventExecutorGroup
TheEventExecutoris a specialEventExecutorGroupwhich comes with some handy methods to see if aThreadis executed in a event loop. Besides this, it also extends theEventExecutorGroupto allow for a generic way to access methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleaninEventLoop()CallsinEventLoop(Thread)withThread.currentThread()as argumentbooleaninEventLoop(Thread thread)default <V> Future<V>newFailedFuture(Throwable cause)Create a newFuturewhich is marked as failed already.default <V> ProgressivePromise<V>newProgressivePromise()Create a newProgressivePromise.default <V> Promise<V>newPromise()Return a newPromise.default <V> Future<V>newSucceededFuture(V result)Create a newFuturewhich is marked as succeeded already.EventExecutorGroupparent()Return theEventExecutorGroupwhich is the parent of thisEventExecutor,-
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, next, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
parent
EventExecutorGroup parent()
Return theEventExecutorGroupwhich is the parent of thisEventExecutor,
-
inEventLoop
default boolean inEventLoop()
CallsinEventLoop(Thread)withThread.currentThread()as argument
-
inEventLoop
boolean inEventLoop(Thread thread)
-
newProgressivePromise
default <V> ProgressivePromise<V> newProgressivePromise()
Create a newProgressivePromise.
-
newSucceededFuture
default <V> Future<V> newSucceededFuture(V result)
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
default <V> Future<V> newFailedFuture(Throwable cause)
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.
-
-