Class ThreadPoolConfig
java.lang.Object
org.exoplatform.social.common.service.thread.ThreadPoolConfig
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Gets the id of this profileGets the keep alive time for inactive threadsGets the maximum pool sizeGets the maximum number of tasks in the work queue.Gets the core pool size (threads to keep minimum in pool)intGets the time unit used for keep alive timebooleanWhether this profile is the default profile (there can only be one).voidsetAsyncMode(boolean asyncMode) voidsetDefaultProfile(Boolean defaultProfile) Sets whether this profile is the default profile (there can only be one).voidSets the id of this profilevoidsetKeepAliveTime(Long keepAliveTime) Sets the keep alive time for inactive threadsvoidsetMaxPoolSize(Integer maxPoolSize) Sets the maximum pool sizevoidsetMaxQueueSize(Integer maxQueueSize) Sets the maximum number of tasks in the work queue.voidsetPoolSize(Integer poolSize) Sets the core pool size (threads to keep minimum in pool)voidsetPriority(int priority) voidsetTimeUnit(TimeUnit timeUnit) Sets the time unit used for keep alive time
-
Constructor Details
-
ThreadPoolConfig
public ThreadPoolConfig(org.exoplatform.container.xml.InitParams params) -
ThreadPoolConfig
public ThreadPoolConfig()
-
-
Method Details
-
getId
Gets the id of this profile- Returns:
- the id of this profile
-
setId
Sets the id of this profile- Parameters:
id- profile id
-
isDefaultProfile
Whether this profile is the default profile (there can only be one).- Returns:
trueif its the default profile,falseotherwise
-
setDefaultProfile
Sets whether this profile is the default profile (there can only be one).- Parameters:
defaultProfile- the option
-
getPoolSize
Gets the core pool size (threads to keep minimum in pool)- Returns:
- the pool size
-
setPoolSize
Sets the core pool size (threads to keep minimum in pool)- Parameters:
poolSize- the pool size
-
getMaxPoolSize
Gets the maximum pool size- Returns:
- the maximum pool size
-
setMaxPoolSize
Sets the maximum pool size- Parameters:
maxPoolSize- the max pool size
-
getKeepAliveTime
Gets the keep alive time for inactive threads- Returns:
- the keep alive time
-
setKeepAliveTime
Sets the keep alive time for inactive threads- Parameters:
keepAliveTime- the keep alive time
-
getTimeUnit
Gets the time unit used for keep alive time- Returns:
- the time unit
-
setTimeUnit
Sets the time unit used for keep alive time- Parameters:
timeUnit- the time unit
-
getMaxQueueSize
Gets the maximum number of tasks in the work queue.
Use-1orInteger.MAX_VALUEfor an unbounded queue- Returns:
- the max queue size
-
setMaxQueueSize
Sets the maximum number of tasks in the work queue.
Use-1orInteger.MAX_VALUEfor an unbounded queue- Parameters:
maxQueueSize- the max queue size
-
getPriority
public int getPriority() -
setPriority
public void setPriority(int priority) -
isAsyncMode
public boolean isAsyncMode() -
setAsyncMode
public void setAsyncMode(boolean asyncMode)
-