|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object seda.sandStorm.internal.ThreadPool
public class ThreadPool
ThreadPool is a generic class which provides a thread pool.
Field Summary | |
---|---|
private AggThrottle |
aggThrottle
|
private int |
blockTime
|
private static boolean |
DEBUG
|
private int |
idleTimeThreshold
|
private int |
maxAggregation
|
(package private) int |
maxThreads
|
private ManagerIF |
mgr
|
(package private) int |
minThreads
|
private java.lang.String |
poolname
|
private java.lang.ThreadGroup |
pooltg
|
private java.lang.Runnable |
runnable
|
private StageWrapperIF |
stage
|
private java.util.Vector |
stoppedThreads
|
private java.util.Vector |
threads
|
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 |
---|
private static final boolean DEBUG
private StageWrapperIF stage
private ManagerIF mgr
private java.lang.String poolname
private java.lang.ThreadGroup pooltg
private java.lang.Runnable runnable
private java.util.Vector threads
private java.util.Vector stoppedThreads
int minThreads
int maxThreads
private int maxAggregation
private int blockTime
private int idleTimeThreshold
private AggThrottle aggThrottle
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 |