|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object seda.sandStorm.internal.AggTPSThreadManager
class AggTPSThreadManager
AggTPSThreadManager is a refinement of the TPSTM; it attempts to schedule stages to improve aggregation. The basic algorithm is to maintain a tunable "aggregation target", the minimum queue size threshold which triggers the execution of a stage's handler. This aggregation target is increased when more than 1 stage can meet the target, and reduced when no stages can meet it. A target of 1 is equivalent to the TPSTM algorithm.
Nested Class Summary | |
---|---|
(package private) class |
AggTPSThreadManager.appThread
Internal class representing a single AggTPSTM-managed thread. |
(package private) class |
AggTPSThreadManager.governorThread
Internal class implementing a thread governor - analyses appThread queue lengths and adjusts thread pool sizes accordingly. |
(package private) class |
AggTPSThreadManager.stageInfo
Internal class representing state for a given stage. |
(package private) class |
AggTPSThreadManager.threadPool
|
Field Summary | |
---|---|
private int |
aggregationTarget
|
private static boolean |
DEBUG
|
private static boolean |
DEBUG_VERBOSE
|
private java.lang.Thread |
governor
|
private int |
governorDelay
|
private int |
governorMaxThreads
|
private int |
governorThreshold
|
private static int |
INITIAL_THREADPOOL_SIZE
|
private java.lang.Object |
lock
|
private int |
maxAggregation
|
private java.util.Vector |
stages
|
private java.lang.ThreadGroup |
tg
|
private java.util.Vector |
threadpools
|
private boolean |
useGovernor
|
Fields inherited from interface seda.sandStorm.internal.sandStormConst |
---|
MAJOR_VERSION, MINOR_VERSION, VERSION_STRING, WELCOME_STRING |
Constructor Summary | |
---|---|
AggTPSThreadManager(SandstormConfig config)
|
Method Summary | |
---|---|
void |
deregister(StageWrapperIF stage)
Deregister a stage with this thread manager. |
void |
deregisterAll()
Stop the thread manager and all threads managed by it. |
void |
register(StageWrapperIF stage)
Register a stage with this thread manager. |
void |
stop()
Stop the thread manager and all threads managed by it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
private static final boolean DEBUG_VERBOSE
private static final int INITIAL_THREADPOOL_SIZE
private int maxAggregation
private java.util.Vector stages
private java.util.Vector threadpools
private java.lang.ThreadGroup tg
private java.lang.Thread governor
private boolean useGovernor
private int governorDelay
private int governorMaxThreads
private int governorThreshold
private int aggregationTarget
private java.lang.Object lock
Constructor Detail |
---|
AggTPSThreadManager(SandstormConfig config)
Method Detail |
---|
public void register(StageWrapperIF stage)
register
in interface ThreadManagerIF
public void deregister(StageWrapperIF stage)
deregister
in interface ThreadManagerIF
public void deregisterAll()
deregisterAll
in interface ThreadManagerIF
public void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |