Package com.powsybl.commons.concurrent
Class CleanableExecutors
java.lang.Object
com.powsybl.commons.concurrent.CleanableExecutors
Thread pool executors that can execute cleaning tasks each time a thread go back to the pool.
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorService
static ExecutorService
newCachedThreadPool
(String poolName) static ExecutorService
newCachedThreadPool
(String poolName, Iterable<CleanableExecutors.ThreadCleaner> cleaners) static ExecutorService
newFixedThreadPool
(int nThreads) static ExecutorService
newFixedThreadPool
(String poolName, int nThreads) static ExecutorService
newFixedThreadPool
(String poolName, int nThreads, Iterable<CleanableExecutors.ThreadCleaner> cleaners) static ExecutorService
newSizeLimitedThreadPool
(int maxSize) static ExecutorService
newSizeLimitedThreadPool
(String poolName, int maxSize) static ExecutorService
newSizeLimitedThreadPool
(String poolName, int maxSize, Iterable<CleanableExecutors.ThreadCleaner> cleaners)
-
Method Details
-
newFixedThreadPool
-
newFixedThreadPool
-
newFixedThreadPool
public static ExecutorService newFixedThreadPool(String poolName, int nThreads, Iterable<CleanableExecutors.ThreadCleaner> cleaners) -
newCachedThreadPool
-
newCachedThreadPool
-
newCachedThreadPool
public static ExecutorService newCachedThreadPool(String poolName, Iterable<CleanableExecutors.ThreadCleaner> cleaners) -
newSizeLimitedThreadPool
-
newSizeLimitedThreadPool
-
newSizeLimitedThreadPool
public static ExecutorService newSizeLimitedThreadPool(String poolName, int maxSize, Iterable<CleanableExecutors.ThreadCleaner> cleaners)
-