seda.sandStorm.internal
Class ResponseTimeController

java.lang.Object
  extended by seda.sandStorm.internal.ResponseTimeController
All Implemented Interfaces:
ResponseTimeControllerIF
Direct Known Subclasses:
ResponseTimeControllerDirect, ResponseTimeControllerMM1, ResponseTimeControllerPID

public abstract class ResponseTimeController
extends java.lang.Object
implements ResponseTimeControllerIF

The ResponseTimeController attempts to keep the response time of a given stage below a given target by adjusting admission control parameters for a stage.


Field Summary
protected static int INIT_THRESHOLD
           
protected static int MAX_THRESHOLD
           
protected static int MIN_THRESHOLD
           
protected  EnqueuePredicateIF pred
           
protected  StageWrapperIF stage
           
protected  double targetRT
           
 
Constructor Summary
protected ResponseTimeController(ManagerIF mgr, StageWrapperIF stage)
           
 
Method Summary
abstract  void adjustThreshold(QueueElementIF[] fetched, long serviceTime)
          Invoked by the stage's thread manager to adjust admission control parameters.
abstract  void disable()
          Disable the response time controller.
abstract  void enable()
          Enable the response time controller.
 double getTarget()
          Return the response time target.
 void setTarget(double target)
          Set the response time target in milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_THRESHOLD

protected static final int INIT_THRESHOLD
See Also:
Constant Field Values

MIN_THRESHOLD

protected static final int MIN_THRESHOLD
See Also:
Constant Field Values

MAX_THRESHOLD

protected static final int MAX_THRESHOLD
See Also:
Constant Field Values

stage

protected StageWrapperIF stage

pred

protected EnqueuePredicateIF pred

targetRT

protected double targetRT
Constructor Detail

ResponseTimeController

protected ResponseTimeController(ManagerIF mgr,
                                 StageWrapperIF stage)
                          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

setTarget

public void setTarget(double target)
Description copied from interface: ResponseTimeControllerIF
Set the response time target in milliseconds.

Specified by:
setTarget in interface ResponseTimeControllerIF

getTarget

public double getTarget()
Description copied from interface: ResponseTimeControllerIF
Return the response time target.

Specified by:
getTarget in interface ResponseTimeControllerIF

adjustThreshold

public abstract void adjustThreshold(QueueElementIF[] fetched,
                                     long serviceTime)
Description copied from interface: ResponseTimeControllerIF
Invoked by the stage's thread manager to adjust admission control parameters.

Specified by:
adjustThreshold in interface ResponseTimeControllerIF

enable

public abstract void enable()
Description copied from interface: ResponseTimeControllerIF
Enable the response time controller.

Specified by:
enable in interface ResponseTimeControllerIF

disable

public abstract void disable()
Description copied from interface: ResponseTimeControllerIF
Disable the response time controller.

Specified by:
disable in interface ResponseTimeControllerIF