Interface ThreadPoolFactory
-
- All Known Implementing Classes:
DefaultThreadPoolFactory
public interface ThreadPoolFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExecutorServicenewCachedThreadPool(ThreadFactory threadFactory)Creates a new cached thread pool
The cached thread pool is a term from the JDK from the methodExecutors.newCachedThreadPool().ScheduledExecutorServicenewScheduledThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)Create a scheduled thread pool using the given thread pool profileExecutorServicenewThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)Create a thread pool using the given thread pool profile
-
-
-
Method Detail
-
newCachedThreadPool
ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
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
ExecutorService newThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)
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
-
-