public class DefaultThreadPoolFactory extends Object implements ThreadPoolFactory
| Constructor and Description |
|---|
DefaultThreadPoolFactory() |
| Modifier and Type | Method and Description |
|---|---|
ExecutorService |
newCachedThreadPool(ThreadFactory threadFactory)
Creates a new cached thread pool
The cached thread pool is a term from the JDK from the method Executors.newCachedThreadPool(). |
ScheduledExecutorService |
newScheduledThreadPool(ThreadPoolConfig config,
ThreadFactory threadFactory)
Create a scheduled thread pool using the given thread pool profile
|
ExecutorService |
newThreadPool(int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit timeUnit,
int maxQueueSize,
ThreadFactory threadFactory) |
ExecutorService |
newThreadPool(ThreadPoolConfig config,
ThreadFactory factory)
Create a thread pool using the given thread pool profile
|
public ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
ThreadPoolFactoryExecutors.newCachedThreadPool().
Typically it will have no size limit (this is why it is handled separatelynewCachedThreadPool in interface ThreadPoolFactorythreadFactory - factory for creating threadspublic ExecutorService newThreadPool(ThreadPoolConfig config, ThreadFactory factory)
ThreadPoolFactorynewThreadPool in interface ThreadPoolFactoryconfig - parameters of the thread poolfactory - factory for creating threadspublic ExecutorService newThreadPool(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit timeUnit, int maxQueueSize, ThreadFactory threadFactory) throws IllegalArgumentException
IllegalArgumentExceptionpublic ScheduledExecutorService newScheduledThreadPool(ThreadPoolConfig config, ThreadFactory threadFactory)
ThreadPoolFactorynewScheduledThreadPool in interface ThreadPoolFactoryconfig - parameters of the thread poolthreadFactory - factory for creating threadsCopyright © 2003–2019 eXo Platform SAS. All rights reserved.