| java.lang.Object seda.sandStorm.internal.ThreadPool
ThreadPool | public class ThreadPool implements ProfilableIF(Code) | | ThreadPool is a generic class which provides a thread pool.
author: Matt Welsh |
Constructor Summary | |
public | ThreadPool(StageWrapperIF stage, ManagerIF mgr, Runnable runnable) Create a thread pool for the given stage, manager and runnable,
with the thread pool controller determining the number of threads
used. | public | ThreadPool(StageWrapperIF stage, ManagerIF mgr, Runnable runnable, int initialThreads, int minThreads, int maxThreads, int blockTime, int idleTimeThreshold) Create a thread pool with the given name, manager, runnable,
and thread sizing parameters. | public | ThreadPool(StageWrapperIF stage, ManagerIF mgr, Runnable runnable, int numThreads) Create a thread pool with the given name, manager, runnable,
and a fixed number of threads. |
minThreadsmaxThreads | int minThreadsmaxThreads(Code) | | |
ThreadPool | public ThreadPool(StageWrapperIF stage, ManagerIF mgr, Runnable runnable)(Code) | | Create a thread pool for the given stage, manager and runnable,
with the thread pool controller determining the number of threads
used.
|
ThreadPool | public ThreadPool(StageWrapperIF stage, ManagerIF mgr, Runnable runnable, int initialThreads, int minThreads, int maxThreads, int blockTime, int idleTimeThreshold)(Code) | | Create a thread pool with the given name, manager, runnable,
and thread sizing parameters.
|
ThreadPool | public ThreadPool(StageWrapperIF stage, ManagerIF mgr, Runnable runnable, int numThreads)(Code) | | Create a thread pool with the given name, manager, runnable,
and a fixed number of threads.
|
addThreads | void addThreads(int num, boolean start)(Code) | | Add threads to this pool.
|
getAggregationTarget | public synchronized int getAggregationTarget()(Code) | | Used by a thread to request its aggregation target from the pool.
|
getBlockTime | public long getBlockTime()(Code) | | Used by a thread to determine its queue block time.
|
numThreads | int numThreads()(Code) | | Return the number of threads in this pool.
|
profileSize | public int profileSize()(Code) | | |
removeThreads | void removeThreads(int num)(Code) | | Remove threads from pool.
|
start | public void start()(Code) | | Start the thread pool.
|
stop | public void stop()(Code) | | Stop the thread pool.
|
stopThread | void stopThread(Thread t)(Code) | | Cause the given thread to stop execution.
|
timeToStop | public boolean timeToStop(long idleTime)(Code) | | Used by a thread to determine whether it should exit.
|
|
|