Package io.netty.util.concurrent
Interface EventExecutor
-
- All Superinterfaces:
EventExecutorGroup
,java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
,java.lang.Iterable<EventExecutor>
,java.util.concurrent.ScheduledExecutorService
- All Known Subinterfaces:
EventLoop
,OrderedEventExecutor
- All Known Implementing Classes:
AbstractEventExecutor
,AbstractEventLoop
,AbstractScheduledEventExecutor
,DefaultEventExecutor
,DefaultEventLoop
,EmbeddedEventLoop
,EpollEventLoop
,GlobalEventExecutor
,ImmediateEventExecutor
,KQueueEventLoop
,NioEventLoop
,NonStickyEventExecutorGroup.NonStickyOrderedEventExecutor
,SingleThreadEventExecutor
,SingleThreadEventLoop
,ThreadPerChannelEventLoop
,UnorderedThreadPoolEventExecutor
public interface EventExecutor extends EventExecutorGroup
TheEventExecutor
is a specialEventExecutorGroup
which comes with some handy methods to see if aThread
is executed in a event loop. Besides this, it also extends theEventExecutorGroup
to allow for a generic way to access methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
inEventLoop()
CallsinEventLoop(Thread)
withThread.currentThread()
as argumentboolean
inEventLoop(java.lang.Thread thread)
Returntrue
if the givenThread
is executed in the event loop,false
otherwise.<V> Future<V>
newFailedFuture(java.lang.Throwable cause)
Create a newFuture
which is marked as failed already.<V> ProgressivePromise<V>
newProgressivePromise()
Create a newProgressivePromise
.<V> Promise<V>
newPromise()
Return a newPromise
.<V> Future<V>
newSucceededFuture(V result)
Create a newFuture
which is marked as succeeded already.EventExecutor
next()
Returns a reference to itself.EventExecutorGroup
parent()
Return theEventExecutorGroup
which is the parent of thisEventExecutor
,-
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
-
-
-
-
Method Detail
-
next
EventExecutor next()
Returns a reference to itself.- Specified by:
next
in interfaceEventExecutorGroup
-
parent
EventExecutorGroup parent()
Return theEventExecutorGroup
which is the parent of thisEventExecutor
,
-
inEventLoop
boolean inEventLoop()
CallsinEventLoop(Thread)
withThread.currentThread()
as argument
-
inEventLoop
boolean inEventLoop(java.lang.Thread thread)
Returntrue
if the givenThread
is executed in the event loop,false
otherwise.
-
newProgressivePromise
<V> ProgressivePromise<V> newProgressivePromise()
Create a newProgressivePromise
.
-
newSucceededFuture
<V> Future<V> newSucceededFuture(V result)
Create a newFuture
which is marked as succeeded already. SoFuture.isSuccess()
will returntrue
. AllFutureListener
added to it will be notified directly. Also every call of blocking methods will just return without blocking.
-
newFailedFuture
<V> Future<V> newFailedFuture(java.lang.Throwable cause)
Create a newFuture
which is marked as failed already. SoFuture.isSuccess()
will returnfalse
. AllFutureListener
added to it will be notified directly. Also every call of blocking methods will just return without blocking.
-
-