Package software.amazon.awssdk.utils
Class ExecutorUtils
java.lang.Object
software.amazon.awssdk.utils.ExecutorUtils
Utilities that make it easier to create, use and destroy
ExecutorService
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorService
newSingleDaemonThreadExecutor
(int queueCapacity, String threadNameFormat) Create a bounded-queue executor with one thread for performing background tasks.static Executor
unmanagedExecutor
(Executor executor) Wrap an executor in a type that cannot be closed, or shut down.
-
Method Details
-
newSingleDaemonThreadExecutor
public static ExecutorService newSingleDaemonThreadExecutor(int queueCapacity, String threadNameFormat) Create a bounded-queue executor with one thread for performing background tasks. The thread in the service is marked as a daemon thread. -
unmanagedExecutor
Wrap an executor in a type that cannot be closed, or shut down.
-