seda.sandStorm.internal
Class ThreadPoolController

java.lang.Object
  extended by seda.sandStorm.internal.ThreadPoolController

public class ThreadPoolController
extends java.lang.Object

The ThreadPoolController is responsible for dynamically adusting the size of a given ThreadPool.


Nested Class Summary
(package private)  class ThreadPoolController.controllerThread
          Internal class implementing the controller.
(package private)  class ThreadPoolController.tpcClient
          Internal class representing a single TPC-controlled thread pool.
 
Field Summary
private static int AUTO_MAX_DETECT_DELAY
           
private static int AUTO_MAX_DETECT_RANDOM_JUMP
           
private  boolean autoMaxDetect
           
private  java.lang.Thread controller
           
private static int CONTROLLER_DELAY
           
private  int controllerDelay
           
private  int controllerThreshold
           
private static boolean DEBUG
           
private  ManagerIF mgr
           
private static double SMOOTH_CONST
           
private static int THROUGHPUT_MEASUREMENT_DELAY
           
private  java.util.Vector tpvec
           
 
Constructor Summary
ThreadPoolController(ManagerIF mgr)
           
ThreadPoolController(ManagerIF mgr, int delay, int threshold)
           
 
Method Summary
 void register(StageWrapperIF stage, ThreadPool tp)
          Register a thread pool with this controller, using the queue threshold specified by the system configuration.
 void register(StageWrapperIF stage, ThreadPool tp, ProfilableIF metric)
          Register a thread pool with this controller, using the queue threshold specified by the system configuration.
private  void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

CONTROLLER_DELAY

private static final int CONTROLLER_DELAY
See Also:
Constant Field Values

THROUGHPUT_MEASUREMENT_DELAY

private static final int THROUGHPUT_MEASUREMENT_DELAY
See Also:
Constant Field Values

AUTO_MAX_DETECT_DELAY

private static final int AUTO_MAX_DETECT_DELAY
See Also:
Constant Field Values

AUTO_MAX_DETECT_RANDOM_JUMP

private static final int AUTO_MAX_DETECT_RANDOM_JUMP
See Also:
Constant Field Values

SMOOTH_CONST

private static final double SMOOTH_CONST
See Also:
Constant Field Values

mgr

private ManagerIF mgr

tpvec

private java.util.Vector tpvec

autoMaxDetect

private boolean autoMaxDetect

controller

private java.lang.Thread controller

controllerDelay

private int controllerDelay

controllerThreshold

private int controllerThreshold
Constructor Detail

ThreadPoolController

public ThreadPoolController(ManagerIF mgr)

ThreadPoolController

public ThreadPoolController(ManagerIF mgr,
                            int delay,
                            int threshold)
Method Detail

register

public void register(StageWrapperIF stage,
                     ThreadPool tp)
Register a thread pool with this controller, using the queue threshold specified by the system configuration.


register

public void register(StageWrapperIF stage,
                     ThreadPool tp,
                     ProfilableIF metric)
Register a thread pool with this controller, using the queue threshold specified by the system configuration.


start

private void start()