| java.lang.Object com.rift.coad.lib.thread.pool.ThreadPoolManager
ThreadPoolManager | public class ThreadPoolManager (Code) | | This object is responsible for managing a pool of threads assigned to process
a task object.
author: Brett Chaldecott |
Field Summary | |
protected Logger | log |
Method Summary | |
public synchronized int | getMaxSize() This method returns the max size of the thread pool. | public synchronized int | getMinSize() This method returns the min size. | public synchronized int | getSize() This method returns the size of the thread pool. | public synchronized void | releaseThread() This method releases threads a thread from the pool. | public synchronized void | setMaxSize(int maxSize) This method sets the maximum size of the thread pool. | public synchronized void | setMinSize(int minSize) This method sets the minum size of the thread pool. | public synchronized void | setSize(int size) This method sets the size of the thread pool. | public void | terminate() This method is called to terminate the thread pool. |
ThreadPoolManager | public ThreadPoolManager(int size, Class taskClass, String username) throws PoolException(Code) | | Creates a new instance of ThreadPoolManager
Parameters: size - The size of this thread pool. Parameters: taskClass - The class that implements the task interface. Parameters: username - The name of the user that the threads will run as. exception: PoolException - |
ThreadPoolManager | public ThreadPoolManager(int minSize, int maxSize, Class taskClass, String username) throws PoolException(Code) | | Creates a new instance of ThreadPoolManager
Parameters: minSize - The minimum size of this thread pool. Parameters: maxSize - The maximum size of this thread pool. Parameters: taskClass - The class that implements the task interface. Parameters: username - The name of the user that the threads will run as. exception: PoolException - |
getMaxSize | public synchronized int getMaxSize()(Code) | | This method returns the max size of the thread pool.
The maximum size of the thread pool. |
getMinSize | public synchronized int getMinSize()(Code) | | This method returns the min size.
The minimum size of the thread pool. |
getSize | public synchronized int getSize()(Code) | | This method returns the size of the thread pool.
The size of the thread pool. |
releaseThread | public synchronized void releaseThread() throws PoolException(Code) | | This method releases threads a thread from the pool.
exception: PoolException - |
setMaxSize | public synchronized void setMaxSize(int maxSize) throws PoolException(Code) | | This method sets the maximum size of the thread pool.
Parameters: maxSize - The maximum size of the thread pool. |
setMinSize | public synchronized void setMinSize(int minSize) throws PoolException(Code) | | This method sets the minum size of the thread pool.
Parameters: minSize - The minimum size of the pool. exception: PoolException - |
setSize | public synchronized void setSize(int size) throws PoolException(Code) | | This method sets the size of the thread pool.
Parameters: size - The size of the thread pool. exception: PoolException - |
terminate | public void terminate() throws PoolException(Code) | | This method is called to terminate the thread pool.
|
|
|