org.exoplatform.social.common.service.thread
Class ThreadPoolConfig

java.lang.Object
  extended by org.exoplatform.social.common.service.thread.ThreadPoolConfig
All Implemented Interfaces:
Serializable

public class ThreadPoolConfig
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
ThreadPoolConfig()
           
ThreadPoolConfig(org.exoplatform.container.xml.InitParams params)
           
 
Method Summary
 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)
 int getPriority()
           
 TimeUnit getTimeUnit()
          Gets the time unit used for keep alive time
 boolean isAsyncMode()
           
 Boolean isDefaultProfile()
          Whether this profile is the default profile (there can only be one).
 void setAsyncMode(boolean asyncMode)
           
 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 setPriority(int priority)
           
 void setTimeUnit(TimeUnit timeUnit)
          Sets the time unit used for keep alive time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolConfig

public ThreadPoolConfig(org.exoplatform.container.xml.InitParams params)

ThreadPoolConfig

public ThreadPoolConfig()
Method Detail

getId

public String getId()
Gets the id of this profile

Returns:
the id of this profile

setId

public void setId(String id)
Sets the id of this profile

Parameters:
id - profile id

isDefaultProfile

public Boolean isDefaultProfile()
Whether this profile is the default profile (there can only be one).

Returns:
true if its the default profile, false otherwise

setDefaultProfile

public void setDefaultProfile(Boolean defaultProfile)
Sets whether this profile is the default profile (there can only be one).

Parameters:
defaultProfile - the option

getPoolSize

public Integer getPoolSize()
Gets the core pool size (threads to keep minimum in pool)

Returns:
the pool size

setPoolSize

public void setPoolSize(Integer poolSize)
Sets the core pool size (threads to keep minimum in pool)

Parameters:
poolSize - the pool size

getMaxPoolSize

public Integer getMaxPoolSize()
Gets the maximum pool size

Returns:
the maximum pool size

setMaxPoolSize

public void setMaxPoolSize(Integer maxPoolSize)
Sets the maximum pool size

Parameters:
maxPoolSize - the max pool size

getKeepAliveTime

public Long getKeepAliveTime()
Gets the keep alive time for inactive threads

Returns:
the keep alive time

setKeepAliveTime

public void setKeepAliveTime(Long keepAliveTime)
Sets the keep alive time for inactive threads

Parameters:
keepAliveTime - the keep alive time

getTimeUnit

public TimeUnit getTimeUnit()
Gets the time unit used for keep alive time

Returns:
the time unit

setTimeUnit

public void setTimeUnit(TimeUnit timeUnit)
Sets the time unit used for keep alive time

Parameters:
timeUnit - the time unit

getMaxQueueSize

public Integer getMaxQueueSize()
Gets the maximum number of tasks in the work queue.

Use -1 or Integer.MAX_VALUE for an unbounded queue

Returns:
the max queue size

setMaxQueueSize

public void setMaxQueueSize(Integer maxQueueSize)
Sets the maximum number of tasks in the work queue.

Use -1 or Integer.MAX_VALUE for 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)


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.