public interface EventExecutorGroup extends java.util.concurrent.ScheduledExecutorService, java.lang.Iterable<EventExecutor>
EventExecutorGroup负责通过其next()方法提供EventExecutor的使用方法。
除此之外,它还负责处理它们的生命周期并允许以全球方式关闭它们。
| Modifier and Type | Method and Description |
|---|---|
boolean |
isShuttingDown()
返回 true当且仅当所有EventExecutor由该被管小号EventExecutorGroup正在shut down gracefully或者被关闭。
|
java.util.Iterator<EventExecutor> |
iterator() |
EventExecutor |
next()
返回的一个 EventExecutor由该被管小号EventExecutorGroup 。
|
<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) |
void |
shutdown()
|
Future<?> |
shutdownGracefully()
具有合理默认值的
shutdownGracefully(long, long, TimeUnit)的快捷方法。
|
Future<?> |
shutdownGracefully(long quietPeriod, long timeout, java.util.concurrent.TimeUnit unit)
该执行者表示该调用者希望执行者被关闭。
|
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) |
Future<?> |
terminationFuture()
返回 Future ,当此EventExecutorGroup管理的所有EventExecutor均已终止时,通知Future 。
|
boolean isShuttingDown()
true当且仅当所有EventExecutor由该被管小号EventExecutorGroup正在shut down gracefully或者被关闭。
Future<?> shutdownGracefully()
shutdownGracefully(long, long, TimeUnit)的快捷方法。
Future<?> shutdownGracefully(long quietPeriod, long timeout, java.util.concurrent.TimeUnit unit)
isShuttingDown()开始返回true ,执行程序准备关闭。
与shutdown()不同,正常关机确保在关闭之前没有任何任务被提交到“安静期” (通常是几秒钟)。
如果任务在安静期提交,则保证被接受,安静期将重新开始。
quietPeriod - 文档中描述的安静期
timeout - 无论任务是否在安静期间提交,等待执行程序为
shutdown()的最长时间
unit -
quietPeriod和
timeout的单位
terminationFuture()
Future<?> terminationFuture()
Future ,当此EventExecutorGroup管理的所有EventExecutor都已终止时,会通知该Future 。
@Deprecated void shutdown()
shutdown接口
java.util.concurrent.ExecutorService
@Deprecated java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow ,界面
java.util.concurrent.ExecutorService
EventExecutor next()
EventExecutor由该被管小号EventExecutorGroup 。
java.util.Iterator<EventExecutor> iterator()
iterator ,界面
java.lang.Iterable<EventExecutor>
Future<?> submit(java.lang.Runnable task)
submit ,界面
java.util.concurrent.ExecutorService
<T> Future<T> submit(java.lang.Runnable task, T result)
submit在界面
java.util.concurrent.ExecutorService
<T> Future<T> submit(java.util.concurrent.Callable<T> task)
submit ,界面
java.util.concurrent.ExecutorService
ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
schedule ,界面
java.util.concurrent.ScheduledExecutorService
<V> ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
schedule接口
java.util.concurrent.ScheduledExecutorService
ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
scheduleAtFixedRate ,界面
java.util.concurrent.ScheduledExecutorService
ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
scheduleWithFixedDelay ,界面
java.util.concurrent.ScheduledExecutorService
Copyright © 2008–2018 The Netty Project. All rights reserved.