public interface EventExecutorGroup extends ScheduledExecutorService, Iterable<EventExecutor>
EventExecutorGroup is responsible for providing the EventExecutor's to use
via its next() method. Besides this, it is also responsible for handling their
life-cycle and allows shutting them down in a global fashion.| Modifier and Type | Method and Description |
|---|---|
boolean |
isShuttingDown()
Returns
true if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down. |
Iterator<EventExecutor> |
iterator() |
EventExecutor |
next()
Returns one of the
EventExecutors managed by this EventExecutorGroup. |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
void |
shutdown()
Deprecated.
|
Future<?> |
shutdownGracefully()
Shortcut method for
shutdownGracefully(long, long, TimeUnit) with sensible default values. |
Future<?> |
shutdownGracefully(long quietPeriod,
long timeout,
TimeUnit unit)
Signals this executor that the caller wants the executor to be shut down.
|
List<Runnable> |
shutdownNow()
Deprecated.
|
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
Future<?> |
terminationFuture()
Returns the
Future which is notified when all EventExecutors managed by this
EventExecutorGroup have been terminated. |
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedforEach, spliteratorboolean isShuttingDown()
true if and only if all EventExecutors managed by this EventExecutorGroup
are being shut down gracefully or was shut down.Future<?> shutdownGracefully()
shutdownGracefully(long, long, TimeUnit) with sensible default values.terminationFuture()Future<?> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)
isShuttingDown() starts to return true, and the executor prepares to shut itself down.
Unlike shutdown(), graceful shutdown ensures that no tasks are submitted for 'the quiet period'
(usually a couple seconds) before it shuts itself down. If a task is submitted during the quiet period,
it is guaranteed to be accepted and the quiet period will start over.quietPeriod - the quiet period as described in the documentationtimeout - the maximum amount of time to wait until the executor is shutdown()
regardless if a task was submitted during the quiet periodunit - the unit of quietPeriod and timeoutterminationFuture()Future<?> terminationFuture()
Future which is notified when all EventExecutors managed by this
EventExecutorGroup have been terminated.@Deprecated void shutdown()
shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.shutdown in interface ExecutorService@Deprecated List<Runnable> shutdownNow()
shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.shutdownNow in interface ExecutorServiceEventExecutor next()
EventExecutors managed by this EventExecutorGroup.Iterator<EventExecutor> iterator()
iterator in interface Iterable<EventExecutor>Future<?> submit(Runnable task)
submit in interface ExecutorService<T> Future<T> submit(Runnable task, T result)
submit in interface ExecutorService<T> Future<T> submit(Callable<T> task)
submit in interface ExecutorServiceScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorService<V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServiceScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface ScheduledExecutorServiceScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface ScheduledExecutorServiceCopyright © 2008–2025 The Netty Project. All rights reserved.