@Metadata(label="eip,routing") public class ThreadsDefinition extends NoOutputDefinition<ThreadsDefinition> implements ExecutorServiceAwareDefinition<ThreadsDefinition>
inheritErrorHandler, log
Constructor and Description |
---|
ThreadsDefinition() |
Modifier and Type | Method and Description |
---|---|
ThreadsDefinition |
allowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
Whether idle core threads are allowed to timeout and therefore can shrink the pool size below the core pool size
Is by default false
|
ThreadsDefinition |
allowCoreThreadTimeOut(String allowCoreThreadTimeOut)
Whether idle core threads is allowed to timeout and therefore can shrink the pool size below the core pool size
Is by default false
|
ThreadsDefinition |
callerRunsWhenRejected(boolean callerRunsWhenRejected)
Whether or not to use as caller runs as fallback when a task is rejected being added to the thread pool
(when its full).
|
ThreadsDefinition |
callerRunsWhenRejected(String callerRunsWhenRejected)
Whether or not to use as caller runs as fallback when a task is rejected being added to the thread pool
(when its full).
|
ThreadsDefinition |
executorService(ExecutorService executorService)
To use a custom thread pool
|
ThreadsDefinition |
executorServiceRef(String executorServiceRef)
To refer to a custom thread pool or use a thread pool profile (as overlay)
|
String |
getAllowCoreThreadTimeOut() |
String |
getCallerRunsWhenRejected() |
ExecutorService |
getExecutorService() |
String |
getExecutorServiceRef() |
String |
getKeepAliveTime() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
String |
getMaxPoolSize() |
String |
getMaxQueueSize() |
String |
getPoolSize() |
String |
getRejectedPolicy() |
String |
getShortName() |
String |
getThreadName() |
String |
getTimeUnit() |
ThreadsDefinition |
keepAliveTime(long keepAliveTime)
Sets the keep alive time for idle threads
|
ThreadsDefinition |
keepAliveTime(String keepAliveTime)
Sets the keep alive time for idle threads
|
ThreadsDefinition |
maxPoolSize(int maxPoolSize)
Sets the maximum pool size
|
ThreadsDefinition |
maxPoolSize(String maxPoolSize)
Sets the maximum pool size
|
ThreadsDefinition |
maxQueueSize(int maxQueueSize)
Sets the maximum number of tasks in the work queue.
|
ThreadsDefinition |
maxQueueSize(String maxQueueSize)
Sets the maximum number of tasks in the work queue.
|
ThreadsDefinition |
poolSize(int poolSize)
Sets the core pool size
|
ThreadsDefinition |
poolSize(String poolSize)
Sets the core pool size
|
ThreadsDefinition |
rejectedPolicy(String rejectedPolicy)
Sets the handler for tasks which cannot be executed by the thread pool.
|
ThreadsDefinition |
rejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
Sets the handler for tasks which cannot be executed by the thread pool.
|
void |
setAllowCoreThreadTimeOut(String allowCoreThreadTimeOut) |
void |
setCallerRunsWhenRejected(String callerRunsWhenRejected) |
void |
setExecutorService(ExecutorService executorService) |
void |
setExecutorServiceRef(String executorServiceRef) |
void |
setKeepAliveTime(String keepAliveTime) |
void |
setMaxPoolSize(String maxPoolSize) |
void |
setMaxQueueSize(String maxQueueSize) |
void |
setPoolSize(String poolSize) |
void |
setRejectedPolicy(String rejectedPolicy) |
void |
setThreadName(String threadName) |
void |
setTimeUnit(String timeUnit) |
ThreadsDefinition |
threadName(String threadName)
Sets the thread name to use.
|
ThreadsDefinition |
timeUnit(String keepAliveTimeUnits)
Sets the keep alive time unit.
|
ThreadsDefinition |
timeUnit(TimeUnit keepAliveTimeUnits)
Sets the keep alive time unit.
|
String |
toString() |
getOutputs
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, preCreateProcessor, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
executorService
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ProcessorDefinition<ThreadsDefinition>
public ThreadsDefinition executorService(ExecutorService executorService)
executorService
in interface ExecutorServiceAwareDefinition<ThreadsDefinition>
executorService
- the executor servicepublic ThreadsDefinition executorServiceRef(String executorServiceRef)
executorServiceRef
in interface ExecutorServiceAwareDefinition<ThreadsDefinition>
executorServiceRef
- reference for a ExecutorService
to lookup in the
Registry
public ThreadsDefinition poolSize(int poolSize)
poolSize
- the core pool size to keep minimum in the poolpublic ThreadsDefinition poolSize(String poolSize)
poolSize
- the core pool size to keep minimum in the poolpublic ThreadsDefinition maxPoolSize(int maxPoolSize)
maxPoolSize
- the maximum pool sizepublic ThreadsDefinition maxPoolSize(String maxPoolSize)
maxPoolSize
- the maximum pool sizepublic ThreadsDefinition keepAliveTime(long keepAliveTime)
keepAliveTime
- keep alive timepublic ThreadsDefinition keepAliveTime(String keepAliveTime)
keepAliveTime
- keep alive timepublic ThreadsDefinition timeUnit(TimeUnit keepAliveTimeUnits)
keepAliveTimeUnits
- time unitpublic ThreadsDefinition timeUnit(String keepAliveTimeUnits)
keepAliveTimeUnits
- time unitpublic ThreadsDefinition maxQueueSize(int maxQueueSize)
maxQueueSize
- the max queue sizepublic ThreadsDefinition maxQueueSize(String maxQueueSize)
maxQueueSize
- the max queue sizepublic ThreadsDefinition rejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
rejectedPolicy
- the policy for the handlerpublic ThreadsDefinition rejectedPolicy(String rejectedPolicy)
rejectedPolicy
- the policy for the handlerpublic ThreadsDefinition threadName(String threadName)
threadName
- the thread namepublic ThreadsDefinition callerRunsWhenRejected(boolean callerRunsWhenRejected)
callerRunsWhenRejected
- whether or not the caller should runpublic ThreadsDefinition callerRunsWhenRejected(String callerRunsWhenRejected)
callerRunsWhenRejected
- whether or not the caller should runpublic ThreadsDefinition allowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
allowCoreThreadTimeOut
- true to allow timeoutpublic ThreadsDefinition allowCoreThreadTimeOut(String allowCoreThreadTimeOut)
allowCoreThreadTimeOut
- true to allow timeoutpublic ExecutorService getExecutorService()
getExecutorService
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
setExecutorService
in interface org.apache.camel.ExecutorServiceAware
public String getExecutorServiceRef()
getExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorServiceRef(String executorServiceRef)
setExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public String getPoolSize()
public void setPoolSize(String poolSize)
public String getMaxPoolSize()
public void setMaxPoolSize(String maxPoolSize)
public String getKeepAliveTime()
public void setKeepAliveTime(String keepAliveTime)
public String getTimeUnit()
public void setTimeUnit(String timeUnit)
public String getMaxQueueSize()
public void setMaxQueueSize(String maxQueueSize)
public String getThreadName()
public void setThreadName(String threadName)
public String getRejectedPolicy()
public void setRejectedPolicy(String rejectedPolicy)
public String getCallerRunsWhenRejected()
public void setCallerRunsWhenRejected(String callerRunsWhenRejected)
public String getAllowCoreThreadTimeOut()
public void setAllowCoreThreadTimeOut(String allowCoreThreadTimeOut)
Apache Camel