seda.sandStorm.internal
Class AggTPSThreadManager

java.lang.Object
  extended by seda.sandStorm.internal.AggTPSThreadManager
All Implemented Interfaces:
ThreadManagerIF, sandStormConst

 class AggTPSThreadManager
extends java.lang.Object
implements ThreadManagerIF, sandStormConst

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.

Author:
Matt Welsh

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
 
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
 

Constructor Detail

AggTPSThreadManager

AggTPSThreadManager(SandstormConfig config)
Method Detail

register

public void register(StageWrapperIF stage)
Register a stage with this thread manager.

Specified by:
register in interface ThreadManagerIF

deregister

public void deregister(StageWrapperIF stage)
Deregister a stage with this thread manager.

Specified by:
deregister in interface ThreadManagerIF

deregisterAll

public void deregisterAll()
Stop the thread manager and all threads managed by it.

Specified by:
deregisterAll in interface ThreadManagerIF

stop

public void stop()
Stop the thread manager and all threads managed by it.