|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectseda.sandStorm.internal.ThreadPool
public class ThreadPool
ThreadPool is a generic class which provides a thread pool.
Field Summary | |
---|---|
(package private) int |
maxThreads
|
(package private) int |
minThreads
|
Constructor Summary | |
---|---|
ThreadPool(StageWrapperIF stage,
ManagerIF mgr,
java.lang.Runnable runnable)
Create a thread pool for the given stage, manager and runnable, with the thread pool controller determining the number of threads used. |
|
ThreadPool(StageWrapperIF stage,
ManagerIF mgr,
java.lang.Runnable runnable,
int numThreads)
Create a thread pool with the given name, manager, runnable, and a fixed number of threads. |
|
ThreadPool(StageWrapperIF stage,
ManagerIF mgr,
java.lang.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. |
Method Summary | |
---|---|
(package private) void |
addThreads(int num,
boolean start)
Add threads to this pool. |
int |
getAggregationTarget()
Used by a thread to request its aggregation target from the pool. |
long |
getBlockTime()
Used by a thread to determine its queue block time. |
java.lang.String |
getName()
|
(package private) int |
numThreads()
Return the number of threads in this pool. |
int |
profileSize()
Return the size of the object being profiled. |
(package private) void |
removeThreads(int num)
Remove threads from pool. |
void |
start()
Start the thread pool. |
void |
stop()
Stop the thread pool. |
(package private) void |
stopThread(java.lang.Thread t)
Cause the given thread to stop execution. |
boolean |
timeToStop(long idleTime)
Used by a thread to determine whether it should exit. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int minThreads
int maxThreads
Constructor Detail |
---|
public ThreadPool(StageWrapperIF stage, ManagerIF mgr, java.lang.Runnable runnable)
public ThreadPool(StageWrapperIF stage, ManagerIF mgr, java.lang.Runnable runnable, int initialThreads, int minThreads, int maxThreads, int blockTime, int idleTimeThreshold)
public ThreadPool(StageWrapperIF stage, ManagerIF mgr, java.lang.Runnable runnable, int numThreads)
Method Detail |
---|
public void start()
public void stop()
void addThreads(int num, boolean start)
void removeThreads(int num)
void stopThread(java.lang.Thread t)
int numThreads()
public long getBlockTime()
public int getAggregationTarget()
public boolean timeToStop(long idleTime)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public int profileSize()
ProfilableIF
profileSize
in interface ProfilableIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |