EventExecutorGroup
implementations that handles their tasks with multiple threads at
the same time.
Modifier and Type | Field and Description |
---|---|
private final EventExecutor[] | |
private final EventExecutorChooserFactory. | |
private final Set | |
private final AtomicInteger | |
private final Promise |
Access | Constructor and Description |
---|---|
protected | MultithreadEventExecutorGroup(int
the number of threads that will be used by this instance. nThreads, ThreadFactory the ThreadFactory to use, or threadFactory, Object... null if the default should be used.arguments which will passed to each args)newChild(Executor, Object. callCreate a new instance. |
protected | MultithreadEventExecutorGroup(int
the number of threads that will be used by this instance. nThreads, Executor the Executor to use, or executor, Object... null if the default should be used.arguments which will passed to each args)newChild(Executor, Object. callCreate a new instance. |
protected | MultithreadEventExecutorGroup(int
the number of threads that will be used by this instance. nThreads, Executor the Executor to use, or executor, EventExecutorChooserFactory null if the default should be used.the chooserFactory, Object... EventExecutorChooserFactory to use.arguments which will passed to each args)newChild(Executor, Object. callCreate a new instance. |
Modifier and Type | Method and Description |
---|---|
public boolean | awaitTermination(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. |
public final int | |
public boolean | isShutdown()
Implements java. true if this executor has been shut down.
|
public boolean | isShuttingDown()
Implements io. true if and only if all EventExecutor s managed by this EventExecutorGroup
are being shut down gracefully or was shut down.
|
public boolean | isTerminated()
Implements java. true if all tasks have completed following shut down.
|
public Iterator | iterator()
Implements io. T .
|
protected abstract EventExecutor | |
protected ThreadFactory | |
public EventExecutor | next()
Implements io. EventExecutor s managed by this EventExecutorGroup .
|
public void | shutdown()
Implements abstract io. Implements io.
Deprecated
Initiates an orderly shutdown in which previously submitted
tasks are executed, but no new tasks will be accepted.
|
public Future | shutdownGracefully(long
the quiet period as described in the documentation quietPeriod, long the maximum amount of time to wait until the executor is shutdown()
regardless if a task was submitted during the quiet period timeout, TimeUnit the unit of unit)quietPeriod and timeout Implements io. |
public Future | terminationFuture()
Implements io. Future which is notified when all EventExecutor s managed by this
EventExecutorGroup have been terminated.
|
children | back to summary |
---|---|
private final EventExecutor[] children |
chooser | back to summary |
---|---|
private final EventExecutorChooserFactory. |
readonlyChildren | back to summary |
---|---|
private final Set<EventExecutor> readonlyChildren |
terminatedChildren | back to summary |
---|---|
private final AtomicInteger terminatedChildren |
terminationFuture | back to summary |
---|---|
private final Promise<?> terminationFuture |
MultithreadEventExecutorGroup | back to summary |
---|---|
protected MultithreadEventExecutorGroup(int nThreads, ThreadFactory threadFactory, Object... args) Create a new instance.
|
MultithreadEventExecutorGroup | back to summary |
---|---|
protected MultithreadEventExecutorGroup(int nThreads, Executor executor, Object... args) Create a new instance.
|
MultithreadEventExecutorGroup | back to summary |
---|---|
protected MultithreadEventExecutorGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory, Object... args) Create a new instance.
|
awaitTermination | back to summary |
---|---|
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException Implements java. Doc from java. Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
|
executorCount | back to summary |
---|---|
public final int executorCount() Return the number of |
isShutdown | back to summary |
---|---|
public boolean isShutdown() Implements java. Doc from java. Returns
|
isShuttingDown | back to summary |
---|---|
public boolean isShuttingDown() Implements io. Doc from io. Returns
|
isTerminated | back to summary |
---|---|
public boolean isTerminated() Implements java. Doc from java. Returns
|
iterator | back to summary |
---|---|
public Iterator Implements io. Doc from java. Returns an iterator over elements of type
|
newChild | back to summary |
---|---|
protected abstract EventExecutor newChild(Executor executor, Object... args) throws Exception Create a new EventExecutor which will later then accessible via the |
newDefaultThreadFactory | back to summary |
---|---|
protected ThreadFactory newDefaultThreadFactory() |
next | back to summary |
---|---|
public EventExecutor next() Implements io. Doc from io. Returns one of the
|
shutdown | back to summary |
---|---|
public void shutdown() Implements abstract io. Implements io. Doc from java. Deprecated
Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down. This method does not wait for previously submitted tasks to
complete execution. Use
|
shutdownGracefully | back to summary |
---|---|
public Future Implements io. Doc from io. Signals this executor that the caller wants the executor to be shut down. Once this method is called,
|
terminationFuture | back to summary |
---|---|
public Future Implements io. Doc from io. Returns the
|