Netty学习:EventExecutorGroup

{@link EventExecutorGroup}负责通过其{@link #next()}方法提供{@link EventExecutor}的。除此之外,它还负责处理它们的生命周期,并允许在全局范围内关闭它们。

boolean isShuttingDown();当且仅当由这个{@link EventExecutorGroup}管理的所有{@link EventExecutor}正在{@linkplain #shutdownGracefully() shut down gracefully}或已经{@linkplain #isShutdown() shut down}返回TRUE.

Future<?> shutdownGracefully();{@link # shutdown(long, long, TimeUnit)}的快捷方法,具有合理的默认值。返回 {@link #terminationFuture()}

Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit);

Future<?> terminationFuture();返回{@link Future},当这个{@link EventExecutorGroup}管理的所有{@link EventExecutor}终止时,将通知该{@link Future}。

List<Runnable> shutdownNow();

 void shutdown();

 EventExecutor next();返回由这个{@link EventExecutorGroup}管理的{@link EventExecutor}中的一个。

Iterator<EventExecutor> iterator();

Future<?> submit(Runnable task);

<T> Future<T> submit(Runnable task, T result);

<T> Future<T> submit(Callable<T> task);

ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit);

<V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit);

ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit);

ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit);

猜你喜欢

转载自blog.csdn.net/AnY11/article/details/84938646
今日推荐