| Modifier and Type | Class and Description |
|---|---|
| protected class |
| Modifier and Type | Field and Description |
|---|---|
| protected final SshThreadPoolExecutor. |
| Access | Constructor and Description |
|---|---|
| public | SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
|
| public | SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)
|
| public | SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler)
|
| public | SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addCloseFutureListener(SshFutureListener<CloseFuture>
The notification listener)SshFutureListener - never nullImplements org. Pre-register a listener to be informed when resource is closed. |
| public boolean | awaitTermination(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Overrides java. Implements 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. |
| public CloseFuture | close(boolean
true if the resource should be shut down abruptly, false for a
graceful closeImplements org. Close this resource asynchronously and return a future. |
| public boolean | isClosed()
Implements org. Returns |
| public boolean | isClosing()
Implements org. Returns |
| public boolean | isShutdown()
Overrides java. Implements java. Returns |
| public boolean | isTerminated()
Overrides java. Implements java. Returns |
| public boolean | isTerminating()
Overrides java. Returns true if this executor is in the process of terminating
after |
| public void | removeCloseFutureListener(SshFutureListener<CloseFuture>
The register listener)SshFutureListener - never null. Ignored if not registered or
resource already closedImplements org. Remove a pre-registered close event listener |
| public void | shutdown()
Overrides java. Implements java. Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. |
| public List | shutdownNow()
Overrides java. Implements java. Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. |
| protected void | terminated()
Overrides java. Method invoked when the Executor has terminated. |
| closeable | back to summary |
|---|---|
| protected final SshThreadPoolExecutor. | |
| SshThreadPoolExecutor | back to summary |
|---|---|
| public SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) | |
| SshThreadPoolExecutor | back to summary |
|---|---|
| public SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) | |
| SshThreadPoolExecutor | back to summary |
|---|---|
| public SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) | |
| SshThreadPoolExecutor | back to summary |
|---|---|
| public SshThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) | |
| addCloseFutureListener | back to summary |
|---|---|
| public void addCloseFutureListener(SshFutureListener<CloseFuture> listener) Implements org. Doc from org. Pre-register a listener to be informed when resource is closed. If resource is already closed, the listener will be invoked immediately and not registered for future notification
| |
| awaitTermination | back to summary |
|---|---|
| public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException Overrides java. 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.
| |
| close | back to summary |
|---|---|
| public CloseFuture close(boolean immediately) Implements org. Doc from org. Close this resource asynchronously and return a future. Resources support two closing modes: a graceful mode which will cleanly close the resource and an immediate mode which will close the resources abruptly.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org. Doc from org. Returns
| |
| isClosing | back to summary |
|---|---|
| public boolean isClosing() Implements org. Doc from org. Returns
| |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown() Overrides java. Implements java. Doc from java. Returns
| |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Overrides java. Implements java. Doc from java. Returns
| |
| isTerminating | back to summary |
|---|---|
| public boolean isTerminating() Overrides java. Doc from java. Returns true if this executor is in the process of terminating
after
| |
| removeCloseFutureListener | back to summary |
|---|---|
| public void removeCloseFutureListener(SshFutureListener<CloseFuture> listener) Implements org. Doc from org. Remove a pre-registered close event listener
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Overrides java. Implements java. Doc from java. 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
| |
| shutdownNow | back to summary |
|---|---|
| public List Overrides java. Implements java. Doc from java. Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. This method does not wait for actively executing tasks to
terminate. Use There are no guarantees beyond best-effort attempts to stop
processing actively executing tasks. For example, typical
implementations will cancel via | |
| terminated | back to summary |
|---|---|
| protected void terminated() Overrides java. Doc from java. Method invoked when the Executor has terminated. Default implementation does nothing. Note To properly nest multiple
overridings, subclasses should generally invoke
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected CloseFuture | |
| protected void | doCloseImmediately()
Overrides org. doCloseImmediately is called once and only once with state == Immediate Overriding methods should always call the base implementation. |
| protected void |
| DelegateCloseable | back to summary |
|---|---|
| protected DelegateCloseable() | |
| doCloseGracefully | back to summary |
|---|---|
| protected CloseFuture doCloseGracefully() Overrides org.
| |
| doCloseImmediately | back to summary |
|---|---|
| protected void doCloseImmediately() Overrides org. Doc from org. doCloseImmediately is called once and only once with state == Immediate Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing
| |
| setClosed | back to summary |
|---|---|
| protected void setClosed() | |