public interface EventExecutor extends EventExecutorGroup
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.限定符和类型 | 方法和说明 |
---|---|
boolean |
inEventLoop()
Calls
inEventLoop(Thread) with Thread.currentThread() as argument |
boolean |
inEventLoop(java.lang.Thread thread)
Return
true if the given Thread is executed in the event loop,
false otherwise. |
<V> Future<V> |
newFailedFuture(java.lang.Throwable cause)
Create a new
Future which is marked as failed already. |
<V> ProgressivePromise<V> |
newProgressivePromise()
Create a new
ProgressivePromise . |
<V> Promise<V> |
newPromise()
Return a new
Promise . |
<V> Future<V> |
newSucceededFuture(V result)
Create a new
Future which is marked as succeeded already. |
EventExecutor |
next()
Returns a reference to itself.
|
EventExecutorGroup |
parent()
Return the
EventExecutorGroup which is the parent of this EventExecutor , |
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFuture
EventExecutor next()
next
在接口中 EventExecutorGroup
EventExecutorGroup parent()
EventExecutorGroup
which is the parent of this EventExecutor
,boolean inEventLoop()
inEventLoop(Thread)
with Thread.currentThread()
as argumentboolean inEventLoop(java.lang.Thread thread)
true
if the given Thread
is executed in the event loop,
false
otherwise.<V> ProgressivePromise<V> newProgressivePromise()
ProgressivePromise
.<V> Future<V> newSucceededFuture(V result)
Future
which is marked as succeeded already. So Future.isSuccess()
will return true
. All FutureListener
added to it will be notified directly. Also
every call of blocking methods will just return without blocking.<V> Future<V> newFailedFuture(java.lang.Throwable cause)
Future
which is marked as failed already. So Future.isSuccess()
will return false
. All FutureListener
added to it will be notified directly. Also
every call of blocking methods will just return without blocking.