Package org.apache.camel.model
Class ThreadPoolProfileDefinition
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<ThreadPoolProfileDefinition>
-
- org.apache.camel.model.ThreadPoolProfileDefinition
-
- All Implemented Interfaces:
org.apache.camel.CamelContextAware
,org.apache.camel.LineNumberAware
,org.apache.camel.NamedNode
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
@Metadata(label="configuration") public class ThreadPoolProfileDefinition extends OptionalIdentifiedDefinition<ThreadPoolProfileDefinition>
To configure thread pools
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolProfileDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadPoolProfileDefinition
allowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
ThreadPoolProfileDefinition
allowCoreThreadTimeOut(String allowCoreThreadTimeOut)
String
getAllowCoreThreadTimeOut()
String
getDefaultProfile()
String
getKeepAliveTime()
String
getLabel()
String
getMaxPoolSize()
String
getMaxQueueSize()
String
getPoolSize()
String
getRejectedPolicy()
String
getShortName()
String
getTimeUnit()
ThreadPoolProfileDefinition
keepAliveTime(long keepAliveTime)
ThreadPoolProfileDefinition
keepAliveTime(String keepAliveTime)
ThreadPoolProfileDefinition
maxPoolSize(int maxPoolSize)
ThreadPoolProfileDefinition
maxPoolSize(String maxPoolSize)
ThreadPoolProfileDefinition
maxQueueSize(int maxQueueSize)
ThreadPoolProfileDefinition
maxQueueSize(String maxQueueSize)
ThreadPoolProfileDefinition
poolSize(int poolSize)
ThreadPoolProfileDefinition
poolSize(String poolSize)
ThreadPoolProfileDefinition
rejectedPolicy(String rejectedPolicy)
ThreadPoolProfileDefinition
rejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
void
setAllowCoreThreadTimeOut(String allowCoreThreadTimeOut)
Whether idle core threads is allowed to timeout and therefore can shrink the pool size below the core pool sizevoid
setDefaultProfile(String defaultProfile)
Whether this profile is the default thread pool profilevoid
setKeepAliveTime(String keepAliveTime)
Sets the keep alive time for idle threads in the poolvoid
setMaxPoolSize(String maxPoolSize)
Sets the maximum pool sizevoid
setMaxQueueSize(String maxQueueSize)
Sets the maximum number of tasks in the work queue.void
setPoolSize(String poolSize)
Sets the core pool sizevoid
setRejectedPolicy(String rejectedPolicy)
Sets the handler for tasks which cannot be executed by the thread pool.void
setTimeUnit(String timeUnit)
Sets the time unit to use for keep alive time By default SECONDS is used.ThreadPoolProfileDefinition
timeUnit(String timeUnit)
ThreadPoolProfileDefinition
timeUnit(TimeUnit timeUnit)
-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, getParent, hasCustomIdAssigned, id, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
-
-
-
-
Method Detail
-
getShortName
public String getShortName()
-
getLabel
public String getLabel()
-
poolSize
public ThreadPoolProfileDefinition poolSize(int poolSize)
-
poolSize
public ThreadPoolProfileDefinition poolSize(String poolSize)
-
maxPoolSize
public ThreadPoolProfileDefinition maxPoolSize(int maxPoolSize)
-
maxPoolSize
public ThreadPoolProfileDefinition maxPoolSize(String maxPoolSize)
-
keepAliveTime
public ThreadPoolProfileDefinition keepAliveTime(long keepAliveTime)
-
keepAliveTime
public ThreadPoolProfileDefinition keepAliveTime(String keepAliveTime)
-
timeUnit
public ThreadPoolProfileDefinition timeUnit(TimeUnit timeUnit)
-
timeUnit
public ThreadPoolProfileDefinition timeUnit(String timeUnit)
-
maxQueueSize
public ThreadPoolProfileDefinition maxQueueSize(int maxQueueSize)
-
maxQueueSize
public ThreadPoolProfileDefinition maxQueueSize(String maxQueueSize)
-
rejectedPolicy
public ThreadPoolProfileDefinition rejectedPolicy(org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy rejectedPolicy)
-
rejectedPolicy
public ThreadPoolProfileDefinition rejectedPolicy(String rejectedPolicy)
-
allowCoreThreadTimeOut
public ThreadPoolProfileDefinition allowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
-
allowCoreThreadTimeOut
public ThreadPoolProfileDefinition allowCoreThreadTimeOut(String allowCoreThreadTimeOut)
-
getDefaultProfile
public String getDefaultProfile()
-
setDefaultProfile
public void setDefaultProfile(String defaultProfile)
Whether this profile is the default thread pool profile
-
getPoolSize
public String getPoolSize()
-
setPoolSize
public void setPoolSize(String poolSize)
Sets the core pool size
-
getMaxPoolSize
public String getMaxPoolSize()
-
setMaxPoolSize
public void setMaxPoolSize(String maxPoolSize)
Sets the maximum pool size
-
getKeepAliveTime
public String getKeepAliveTime()
-
setKeepAliveTime
public void setKeepAliveTime(String keepAliveTime)
Sets the keep alive time for idle threads in the pool
-
getMaxQueueSize
public String getMaxQueueSize()
-
setMaxQueueSize
public void setMaxQueueSize(String maxQueueSize)
Sets the maximum number of tasks in the work queue. Use -1 or Integer.MAX_VALUE for an unbounded queue
-
getAllowCoreThreadTimeOut
public String getAllowCoreThreadTimeOut()
-
setAllowCoreThreadTimeOut
public void setAllowCoreThreadTimeOut(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 true
-
getTimeUnit
public String getTimeUnit()
-
setTimeUnit
public void setTimeUnit(String timeUnit)
Sets the time unit to use for keep alive time By default SECONDS is used.
-
getRejectedPolicy
public String getRejectedPolicy()
-
setRejectedPolicy
public void setRejectedPolicy(String rejectedPolicy)
Sets the handler for tasks which cannot be executed by the thread pool.
-
-