public class ThreadPoolProfile extends Object implements Serializable, Cloneable
Constructor and Description |
---|
ThreadPoolProfile()
Creates a new thread pool profile, with no id set.
|
ThreadPoolProfile(String id)
Creates a new thread pool profile
|
Modifier and Type | Method and Description |
---|---|
void |
addDefaults(ThreadPoolProfile defaultProfile)
Overwrites each attribute that is null with the attribute from defaultProfile
|
ThreadPoolProfile |
clone() |
Boolean |
getAllowCoreThreadTimeOut()
Gets whether to allow core threads to timeout
|
String |
getId()
Gets the id of this profile
|
Long |
getKeepAliveTime()
Gets the keep alive time for inactive threads
|
Integer |
getMaxPoolSize()
Gets the maximum pool size
|
Integer |
getMaxQueueSize()
Gets the maximum number of tasks in the work queue.
|
Integer |
getPoolSize()
Gets the core pool size (threads to keep minimum in pool)
|
RejectedExecutionHandler |
getRejectedExecutionHandler()
Gets the handler for tasks which cannot be executed by the thread pool.
|
ThreadPoolRejectedPolicy |
getRejectedPolicy()
Gets the policy for tasks which cannot be executed by the thread pool.
|
TimeUnit |
getTimeUnit()
Gets the time unit used for keep alive time
|
Boolean |
isDefaultProfile()
Whether this profile is the default profile (there can only be one).
|
void |
setAllowCoreThreadTimeOut(Boolean allowCoreThreadTimeOut)
Sets whethre to allow core threads to timeout
|
void |
setDefaultProfile(Boolean defaultProfile)
Sets whether this profile is the default profile (there can only be one).
|
void |
setId(String id)
Sets the id of this profile
|
void |
setKeepAliveTime(Long keepAliveTime)
Sets the keep alive time for inactive threads
|
void |
setMaxPoolSize(Integer maxPoolSize)
Sets the maximum pool size
|
void |
setMaxQueueSize(Integer maxQueueSize)
Sets the maximum number of tasks in the work queue.
|
void |
setPoolSize(Integer poolSize)
Sets the core pool size (threads to keep minimum in pool)
|
void |
setRejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
Sets the handler for tasks which cannot be executed by the thread pool.
|
void |
setTimeUnit(TimeUnit timeUnit)
Sets the time unit used for keep alive time
|
String |
toString() |
public ThreadPoolProfile()
public ThreadPoolProfile(String id)
id
- id of the profilepublic Boolean isDefaultProfile()
public void setDefaultProfile(Boolean defaultProfile)
defaultProfile
- the optionpublic Integer getPoolSize()
public void setPoolSize(Integer poolSize)
poolSize
- the pool sizepublic Integer getMaxPoolSize()
public void setMaxPoolSize(Integer maxPoolSize)
maxPoolSize
- the max pool sizepublic Long getKeepAliveTime()
public void setKeepAliveTime(Long keepAliveTime)
keepAliveTime
- the keep alive timepublic TimeUnit getTimeUnit()
public void setTimeUnit(TimeUnit timeUnit)
timeUnit
- the time unitpublic Integer getMaxQueueSize()
public void setMaxQueueSize(Integer maxQueueSize)
maxQueueSize
- the max queue sizepublic Boolean getAllowCoreThreadTimeOut()
public void setAllowCoreThreadTimeOut(Boolean allowCoreThreadTimeOut)
allowCoreThreadTimeOut
- true to allow timeoutpublic ThreadPoolRejectedPolicy getRejectedPolicy()
public RejectedExecutionHandler getRejectedExecutionHandler()
public void setRejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy)
rejectedPolicy
- the policy for the handlerpublic void addDefaults(ThreadPoolProfile defaultProfile)
defaultProfile
- profile with default valuespublic ThreadPoolProfile clone()
Apache Camel