public abstract class AbstractEventExecutor extends java.util.concurrent.AbstractExecutorService implements EventExecutor
EventExecutor
实现的抽象基类。
Modifier | Constructor and Description |
---|---|
protected |
AbstractEventExecutor() |
protected |
AbstractEventExecutor(EventExecutorGroup parent) |
Modifier and Type | Method and Description |
---|---|
boolean |
inEventLoop()
以
Thread.currentThread() 作为参数调用
EventExecutor.inEventLoop(Thread)
|
java.util.Iterator<EventExecutor> |
iterator() |
<V> Future<V> |
newFailedFuture(java.lang.Throwable cause)
|
<V> ProgressivePromise<V> |
newProgressivePromise()
创建一个新的 ProgressivePromise 。
|
<V> Promise<V> |
newPromise()
返回一个新的 Promise 。
|
<V> Future<V> |
newSucceededFuture(V result)
|
protected <T> java.util.concurrent.RunnableFuture<T> |
newTaskFor(java.util.concurrent.Callable<T> callable) |
protected <T> java.util.concurrent.RunnableFuture<T> |
newTaskFor(java.lang.Runnable runnable, T value) |
EventExecutor |
next()
返回对自身的引用。
|
EventExecutorGroup |
parent()
|
protected static void |
safeExecute(java.lang.Runnable task)
尝试执行给定
Runnable ,只是记录,如果它抛出一个
Throwable 。
|
<V> ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit) |
ScheduledFuture<?> |
schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit) |
abstract void |
shutdown()
|
Future<?> |
shutdownGracefully()
|
java.util.List<java.lang.Runnable> |
shutdownNow()
|
<T> Future<T> |
submit(java.util.concurrent.Callable<T> task) |
Future<?> |
submit(java.lang.Runnable task) |
<T> Future<T> |
submit(java.lang.Runnable task, T result) |
invokeAll, invokeAll, invokeAny, invokeAny
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
inEventLoop
isShuttingDown, shutdownGracefully, terminationFuture
protected AbstractEventExecutor()
protected AbstractEventExecutor(EventExecutorGroup parent)
public EventExecutorGroup parent()
EventExecutor
EventExecutor
的母公司EventExecutorGroup
,
parent
,界面
EventExecutor
public EventExecutor next()
EventExecutor
复制的描述
next
,界面
EventExecutor
next
,界面
EventExecutorGroup
public boolean inEventLoop()
EventExecutor
Thread.currentThread()
作为参数调用
EventExecutor.inEventLoop(Thread)
inEventLoop
在界面
EventExecutor
public java.util.Iterator<EventExecutor> iterator()
iterator
,界面
EventExecutorGroup
iterator
接口
java.lang.Iterable<EventExecutor>
public Future<?> shutdownGracefully()
EventExecutorGroup
复制的描述
shutdownGracefully
,界面
EventExecutorGroup
EventExecutorGroup.terminationFuture()
@Deprecated public abstract void shutdown()
shutdown
在界面
EventExecutorGroup
shutdown
接口
java.util.concurrent.ExecutorService
@Deprecated public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
接口
EventExecutorGroup
shutdownNow
接口
java.util.concurrent.ExecutorService
public <V> Promise<V> newPromise()
EventExecutor
Promise
。
newPromise
,界面
EventExecutor
public <V> ProgressivePromise<V> newProgressivePromise()
EventExecutor
ProgressivePromise
。
newProgressivePromise
,界面
EventExecutor
public <V> Future<V> newSucceededFuture(V result)
EventExecutor
复制的描述
Future
。
所以Future.isSuccess()
将返回true
。
所有添加到它的FutureListener
将直接通知。
同样,每个阻塞方法的调用都会返回而不会阻塞。
newSucceededFuture
,界面
EventExecutor
public <V> Future<V> newFailedFuture(java.lang.Throwable cause)
EventExecutor
Future
。
所以Future.isSuccess()
将返回false
。
所有添加到它的FutureListener
将直接通知。
同样,每个阻塞方法的调用都会返回而不会阻塞。
newFailedFuture
接口
EventExecutor
public Future<?> submit(java.lang.Runnable task)
submit
接口
EventExecutorGroup
submit
接口
java.util.concurrent.ExecutorService
submit
在课堂
java.util.concurrent.AbstractExecutorService
public <T> Future<T> submit(java.lang.Runnable task, T result)
submit
在界面
EventExecutorGroup
submit
接口
java.util.concurrent.ExecutorService
submit
在课程
java.util.concurrent.AbstractExecutorService
public <T> Future<T> submit(java.util.concurrent.Callable<T> task)
submit
接口
EventExecutorGroup
submit
接口
java.util.concurrent.ExecutorService
submit
在课堂上
java.util.concurrent.AbstractExecutorService
protected final <T> java.util.concurrent.RunnableFuture<T> newTaskFor(java.lang.Runnable runnable, T value)
newTaskFor
在课堂
java.util.concurrent.AbstractExecutorService
protected final <T> java.util.concurrent.RunnableFuture<T> newTaskFor(java.util.concurrent.Callable<T> callable)
newTaskFor
在课程
java.util.concurrent.AbstractExecutorService
public ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
schedule
接口
EventExecutorGroup
schedule
接口
java.util.concurrent.ScheduledExecutorService
public <V> ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
schedule
在界面
EventExecutorGroup
schedule
,界面
java.util.concurrent.ScheduledExecutorService
public ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
scheduleAtFixedRate
,界面
EventExecutorGroup
scheduleAtFixedRate
,界面
java.util.concurrent.ScheduledExecutorService
public ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
scheduleWithFixedDelay
接口
EventExecutorGroup
scheduleWithFixedDelay
在界面
java.util.concurrent.ScheduledExecutorService
protected static void safeExecute(java.lang.Runnable task)
Runnable
,如果它抛出
Runnable
,则只需登录
Throwable
。
Copyright © 2008–2018 The Netty Project. All rights reserved.