|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.spi.ThreadPoolProfile
public class ThreadPoolProfile
A profile which defines thread pool settings.
See more details at threading model
Constructor Summary | |
---|---|
ThreadPoolProfile()
Creates a new thread pool profile, with no id set. |
|
ThreadPoolProfile(String id)
Creates a new thread pool profile |
Method Summary | |
---|---|
void |
addDefaults(ThreadPoolProfile defaultProfile)
Overwrites each attribute that is null with the attribute from defaultProfile |
ThreadPoolProfile |
clone()
|
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 |
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()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThreadPoolProfile()
public ThreadPoolProfile(String id)
id
- id of the profileMethod Detail |
---|
public String getId()
public void setId(String id)
id
- profile idpublic 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 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()
clone
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |