Top Methods
org.apache.sshd.common.util.threads

public Interface CloseableExecutorService

extends ExecutorService, Closeable
Known Direct Implementers
org.apache.sshd.common.util.threads.NoCloseExecutor, org.apache.sshd.common.util.threads.SshThreadPoolExecutor
Imports
java.io.IOException, .UncheckedIOException, java.time.Duration, java.util.Objects, java.util.concurrent.ExecutorService, .TimeUnit, org.apache.sshd.common.Closeable

Method Summary

Modifier and TypeMethod and Description
public default boolean
public default void
close()

Overrides default java.util.concurrent.ExecutorService.close, org.apache.sshd.common.Closeable.close.

Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.

Inherited from java.util.concurrent.ExecutorService:
awaitTerminationinvokeAllinvokeAllinvokeAnyinvokeAnyisShutdownisTerminatedshutdownshutdownNowsubmitsubmitsubmit
Inherited from org.apache.sshd.common.Closeable:
addCloseFutureListenercloseclosegetMaxCloseWaitTimeisClosedisClosingisOpenremoveCloseFutureListener

Method Detail

awaitTerminationback to summary
public default boolean awaitTermination(Duration timeout) throws InterruptedException
closeback to summary
public default void close()

Overrides default java.util.concurrent.ExecutorService.close, org.apache.sshd.common.Closeable.close.

Doc from java.util.concurrent.ExecutorService.close.

Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. This method waits until all tasks have completed execution and the executor has terminated.

If interrupted while waiting, this method stops all executing tasks as if by invoking shutdownNow(). It then continues to wait until all actively executing tasks have completed. Tasks that were awaiting execution are not executed. The interrupt status will be re-asserted before this method returns.

If already terminated, invoking this method has no effect.

Annotations
@Override