Interface ThreadPoolFactory
- All Known Implementing Classes:
DefaultThreadPoolFactory
public interface ThreadPoolFactory
-
Method Summary
Modifier and TypeMethodDescriptionnewCachedThreadPool(ThreadFactory threadFactory) Creates a new cached thread pool
The cached thread pool is a term from the JDK from the methodExecutors.newCachedThreadPool().newScheduledThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory) Create a scheduled thread pool using the given thread pool profilenewThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory) Create a thread pool using the given thread pool profile
-
Method Details
-
newCachedThreadPool
Creates a new cached thread pool
The cached thread pool is a term from the JDK from the methodExecutors.newCachedThreadPool(). Typically it will have no size limit (this is why it is handled separately- Parameters:
threadFactory- factory for creating threads- Returns:
- the created thread pool
-
newThreadPool
Create a thread pool using the given thread pool profile- Parameters:
config- parameters of the thread poolthreadFactory- factory for creating threads- Returns:
- the created thread pool
-
newScheduledThreadPool
ScheduledExecutorService newScheduledThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory) Create a scheduled thread pool using the given thread pool profile- Parameters:
config- parameters of the thread poolthreadFactory- factory for creating threads- Returns:
- the created thread pool
-