|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.builder.ThreadPoolBuilder
public final class ThreadPoolBuilder
A builder to create thread pools.
Constructor Summary | |
---|---|
ThreadPoolBuilder(CamelContext context)
|
Method Summary | |
---|---|
ExecutorService |
build()
Builds the new thread pool |
ExecutorService |
build(Object source,
String name)
Builds the new thread pool |
ExecutorService |
build(String name)
Builds the new thread pool |
ThreadPoolBuilder |
keepAliveTime(long keepAliveTime)
|
ThreadPoolBuilder |
keepAliveTime(long keepAliveTime,
TimeUnit timeUnit)
|
ThreadPoolBuilder |
maxPoolSize(int maxPoolSize)
|
ThreadPoolBuilder |
maxQueueSize(int maxQueueSize)
|
ThreadPoolBuilder |
poolSize(int poolSize)
|
ThreadPoolBuilder |
rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadPoolBuilder(CamelContext context)
Method Detail |
---|
public ThreadPoolBuilder poolSize(int poolSize)
public ThreadPoolBuilder maxPoolSize(int maxPoolSize)
public ThreadPoolBuilder keepAliveTime(long keepAliveTime, TimeUnit timeUnit)
public ThreadPoolBuilder keepAliveTime(long keepAliveTime)
public ThreadPoolBuilder maxQueueSize(int maxQueueSize)
public ThreadPoolBuilder rejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
public ExecutorService build() throws Exception
Exception
- is thrown if error building the thread poolpublic ExecutorService build(String name) throws Exception
name
- name which is appended to the thread name
Exception
- is thrown if error building the thread poolpublic ExecutorService build(Object source, String name) throws Exception
source
- the source object, usually it should be this passed in as parametername
- name which is appended to the thread name
Exception
- is thrown if error building the thread pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |