org.apache.camel.builder
Class ThreadPoolBuilder
java.lang.Object
org.apache.camel.builder.ThreadPoolBuilder
public final class ThreadPoolBuilder
- extends Object
A builder to create thread pools.
- Version:
- $Revision: 925619 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadPoolBuilder
public ThreadPoolBuilder(CamelContext camelContext)
poolSize
public ThreadPoolBuilder poolSize(int poolSize)
maxPoolSize
public ThreadPoolBuilder maxPoolSize(int maxPoolSize)
keepAliveTime
public ThreadPoolBuilder keepAliveTime(long keepAliveTime)
timeUnit
public ThreadPoolBuilder timeUnit(TimeUnit timeUnit)
maxQueueSize
public ThreadPoolBuilder maxQueueSize(int maxQueueSize)
rejectedPolicy
public ThreadPoolBuilder rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
build
public ExecutorService build(String name)
- Builds the new thread pool
- Parameters:
name
- name which is appended to the thread name
- Returns:
- the created thread pool
build
public ExecutorService build(Object source,
String name)
- Builds the new thread pool
- Parameters:
source
- the source object, usually it should be this passed in as parametername
- name which is appended to the thread name
- Returns:
- the created thread pool
Apache CAMEL