| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final ThreadPool | |
| private final AtomicBoolean | |
| private final Object | |
| private final Queue | |
| private volatile boolean | |
| private final AtomicInteger | |
| private final ScheduledThreadPoolExecutor |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract Object | |
| public final boolean | awaitTermination(long timeout, TimeUnit unit)
Implements abstract java. Awaits termination of the group. |
| private Runnable | |
| pack-priv abstract void | |
| pack-priv abstract void | |
| pack-priv final void | detachFromThreadPool()
For use by AsynchronousFileChannel to release resources without shutting down the thread pool. |
| public final void | execute(Runnable task)
Implements java. Executes the given command on one of the channel group's pooled threads. |
| pack-priv abstract void | executeOnHandlerTask(Runnable task)
Wakes up a thread waiting for I/O events to execute the given task. |
| pack-priv final void | executeOnPooledThread(Runnable task)
For a fixed thread pool the task is queued to a thread waiting on I/O events. |
| pack-priv final ExecutorService | |
| pack-priv final int | |
| pack-priv abstract boolean | |
| pack-priv final boolean | |
| public final boolean | isShutdown()
Implements abstract java. Tells whether or not this asynchronous channel group is shutdown. |
| public final boolean | isTerminated()
Implements abstract java. Tells whether or not this group has terminated. |
| pack-priv final void | |
| pack-priv final Runnable | |
| pack-priv final Future | |
| public final void | shutdown()
Implements abstract java. Initiates an orderly shutdown of the group. |
| private void | |
| pack-priv abstract void | |
| public final void | shutdownNow()
Implements abstract java. Shuts down the group and closes all open channels in the group. |
| private void | |
| protected final void | |
| pack-priv final int | |
| pack-priv final int |
| internalThreadCount | back to summary |
|---|---|
| private static final int internalThreadCount | |
| pool | back to summary |
|---|---|
| private final ThreadPool pool | |
| shutdown | back to summary |
|---|---|
| private final AtomicBoolean shutdown | |
| shutdownNowLock | back to summary |
|---|---|
| private final Object shutdownNowLock | |
| taskQueue | back to summary |
|---|---|
| private final Queue<Runnable> taskQueue | |
| terminateInitiated | back to summary |
|---|---|
| private volatile boolean terminateInitiated | |
| threadCount | back to summary |
|---|---|
| private final AtomicInteger threadCount | |
| timeoutExecutor | back to summary |
|---|---|
| private final ScheduledThreadPoolExecutor timeoutExecutor | |
| AsynchronousChannelGroupImpl | back to summary |
|---|---|
| pack-priv AsynchronousChannelGroupImpl(AsynchronousChannelProvider provider, ThreadPool pool) | |
| attachForeignChannel | back to summary |
|---|---|
| pack-priv abstract Object attachForeignChannel(Channel channel, FileDescriptor fdo) throws IOException Attaches a foreign channel to this group. | |
| awaitTermination | back to summary |
|---|---|
| public final boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException Implements abstract java. Doc from java. Awaits termination of the group. This method blocks until the group has terminated, or the timeout occurs, or the current thread is interrupted, whichever happens first.
| |
| bindToGroup | back to summary |
|---|---|
| private Runnable bindToGroup(final Runnable task) | |
| closeAllChannels | back to summary |
|---|---|
| pack-priv abstract void closeAllChannels() throws IOException Closes all channels in the group | |
| detachForeignChannel | back to summary |
|---|---|
| pack-priv abstract void detachForeignChannel(Object key) Detaches a foreign channel from this group. | |
| detachFromThreadPool | back to summary |
|---|---|
| pack-priv final void detachFromThreadPool() For use by AsynchronousFileChannel to release resources without shutting down the thread pool. | |
| execute | back to summary |
|---|---|
| public final void execute(Runnable task) Implements java. Executes the given command on one of the channel group's pooled threads.
| |
| executeOnHandlerTask | back to summary |
|---|---|
| pack-priv abstract void executeOnHandlerTask(Runnable task) Wakes up a thread waiting for I/O events to execute the given task. | |
| executeOnPooledThread | back to summary |
|---|---|
| pack-priv final void executeOnPooledThread(Runnable task) For a fixed thread pool the task is queued to a thread waiting on I/O events. For other thread pools we simply submit the task to the thread pool. | |
| executor | back to summary |
|---|---|
| pack-priv final ExecutorService executor() | |
| fixedThreadCount | back to summary |
|---|---|
| pack-priv final int fixedThreadCount() | |
| isEmpty | back to summary |
|---|---|
| pack-priv abstract boolean isEmpty() Returns true if there are no channels in the group | |
| isFixedThreadPool | back to summary |
|---|---|
| pack-priv final boolean isFixedThreadPool() | |
| isShutdown | back to summary |
|---|---|
| public final boolean isShutdown() Implements abstract java. Doc from java. Tells whether or not this asynchronous channel group is shutdown.
| |
| isTerminated | back to summary |
|---|---|
| public final boolean isTerminated() Implements abstract java. Doc from java. Tells whether or not this group has terminated. Where this method returns
| |
| offerTask | back to summary |
|---|---|
| pack-priv final void offerTask(Runnable task) | |
| pollTask | back to summary |
|---|---|
| pack-priv final Runnable pollTask() | |
| schedule | back to summary |
|---|---|
| pack-priv final Future | |
| shutdown | back to summary |
|---|---|
| public final void shutdown() Implements abstract java. Doc from java. Initiates an orderly shutdown of the group. This method marks the group as shutdown. Further attempts to construct
channel that binds to this group will throw
| |
| shutdownExecutors | back to summary |
|---|---|
| private void shutdownExecutors() | |
| shutdownHandlerTasks | back to summary |
|---|---|
| pack-priv abstract void shutdownHandlerTasks() Shutdown all tasks waiting for I/O events. | |
| shutdownNow | back to summary |
|---|---|
| public final void shutdownNow() throws IOException Implements abstract java. Doc from java. Shuts down the group and closes all open channels in the group. In addition to the actions performed by the
| |
| startInternalThread | back to summary |
|---|---|
| private void startInternalThread(final Runnable task) | |
| startThreads | back to summary |
|---|---|
| protected final void startThreads(Runnable task) | |
| threadCount | back to summary |
|---|---|
| pack-priv final int threadCount() | |
| threadExit | back to summary |
|---|---|
| pack-priv final int threadExit(Runnable task, boolean replaceMe) Invoked by tasks as they terminate | |