public class DefaultThreadPoolFactory extends Object implements ThreadPoolFactory
Executors for creating the thread pools.| 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(ThreadPoolProfile profile,
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,
boolean allowCoreThreadTimeOut,
RejectedExecutionHandler rejectedExecutionHandler,
ThreadFactory threadFactory) |
ExecutorService |
newThreadPool(ThreadPoolProfile profile,
ThreadFactory factory)
Create a thread pool using the given thread pool profile
|
public DefaultThreadPoolFactory()
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(ThreadPoolProfile profile, ThreadFactory factory)
ThreadPoolFactorynewThreadPool in interface ThreadPoolFactoryprofile - parameters of the thread poolfactory - factory for creating threadspublic ExecutorService newThreadPool(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit timeUnit, int maxQueueSize, boolean allowCoreThreadTimeOut, RejectedExecutionHandler rejectedExecutionHandler, ThreadFactory threadFactory) throws IllegalArgumentException
IllegalArgumentExceptionpublic ScheduledExecutorService newScheduledThreadPool(ThreadPoolProfile profile, ThreadFactory threadFactory)
ThreadPoolFactorynewScheduledThreadPool in interface ThreadPoolFactoryprofile - parameters of the thread poolthreadFactory - factory for creating threadsApache Camel