public interface EventExecutor extends EventExecutorGroup
EventExecutor是一个特殊的EventExecutorGroup ,它带有一些方便的方法来查看Thread是否在事件循环中执行。
除此之外,它还扩展了EventExecutorGroup以允许通用方式访问方法。
| Modifier and Type | Method and Description |
|---|---|
boolean |
inEventLoop()
以
Thread.currentThread()作为参数调用
inEventLoop(Thread)
|
boolean |
inEventLoop(java.lang.Thread thread)
返回
true如果给定
Thread在事件循环中执行,
false其他。
|
<V> Future<V> |
newFailedFuture(java.lang.Throwable cause)
|
<V> ProgressivePromise<V> |
newProgressivePromise()
创建一个新的 ProgressivePromise 。
|
<V> Promise<V> |
newPromise()
返回一个新的 Promise 。
|
<V> Future<V> |
newSucceededFuture(V result)
|
EventExecutor |
next()
返回对自身的引用。
|
EventExecutorGroup |
parent()
|
isShuttingDown, iterator, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, shutdown, shutdownGracefully, shutdownGracefully, shutdownNow, submit, submit, submit, terminationFutureEventExecutor next()
next ,界面
EventExecutorGroup
EventExecutorGroup parent()
EventExecutor的父节点EventExecutorGroup ,
boolean inEventLoop()
Thread.currentThread()作为参数调用
inEventLoop(Thread)
boolean inEventLoop(java.lang.Thread thread)
true如果给定
Thread在事件循环中执行,
false其他。
<V> ProgressivePromise<V> newProgressivePromise()
ProgressivePromise 。
<V> Future<V> newSucceededFuture(V result)
Future 。
所以Future.isSuccess()将返回true 。
所有FutureListener添加到它将直接通知。
同样,每个阻塞方法的调用都会返回而不会阻塞。
<V> Future<V> newFailedFuture(java.lang.Throwable cause)
Future 。
所以Future.isSuccess()将返回false 。
所有添加到它的FutureListener将直接通知。
同样,每个阻塞方法的调用都会返回而不会阻塞。
Copyright © 2008–2018 The Netty Project. All rights reserved.