Interface ExecutorServiceFactory
- All Known Implementing Classes:
JDKExecutorServiceFactory
public interface ExecutorServiceFactory
Factory of
ExecutorServices-
Method Summary
Modifier and TypeMethodDescriptionCreates an executor service backed by a cached thread poolnewCachedThreadPool(ThreadFactory threadFactory) Creates an executor service backed by a cached thread poolnewFixedThreadPool(int threadCount) Creates an executor service backed by a fixed number of threadsnewFixedThreadPool(int threadCount, ThreadFactory threadFactory) Creates an executor service backed by a fixed number of threads
-
Method Details
-
newFixedThreadPool
Creates an executor service backed by a fixed number of threads- Parameters:
threadCount- the thread count- Returns:
- the executor service
-
newFixedThreadPool
Creates an executor service backed by a fixed number of threads- Parameters:
threadCount- the thread countthreadFactory- the thread factory- Returns:
- the executor service
-
newCachedThreadPool
ExecutorService newCachedThreadPool()Creates an executor service backed by a cached thread pool- Returns:
- the executor service
-
newCachedThreadPool
Creates an executor service backed by a cached thread pool- Parameters:
threadFactory- the thread factory- Returns:
- the executor service
-