Class ExecutorUtils
java.lang.Object
org.eclipse.aether.util.concurrency.ExecutorUtils
Utilities for executors and sizing them.
- Since:
- 1.9.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Executorstatic voidTo be used with result ofexecutor(int, String)method, shuts down instance if it isExecutorService.static intthreadCount(org.eclipse.aether.RepositorySystemSession session, int defaultValue, String... keys) Retrieves and validates requested thread count based on session and specified keys, or if none provided, the provided default value.static ExecutorServicethreadPool(int poolSize, String namePrefix) Creates new thread poolExecutorService.
-
Field Details
-
DIRECT_EXECUTOR
Shared instance of "direct executor".
-
-
Constructor Details
-
ExecutorUtils
public ExecutorUtils()
-
-
Method Details
-
threadPool
Creates new thread poolExecutorService. ThepoolSizeparameter but be greater than 1. -
executor
-
shutdown
To be used with result ofexecutor(int, String)method, shuts down instance if it isExecutorService. -
threadCount
public static int threadCount(org.eclipse.aether.RepositorySystemSession session, int defaultValue, String... keys) Retrieves and validates requested thread count based on session and specified keys, or if none provided, the provided default value. This method validates result on top of whatConfigUtilsdoes.- Throws:
IllegalArgumentException- if default value is less than 1.- See Also:
-