|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.loadvariance.LoadVarianceAlgorithm
com.sun.slamd.loadvariance.SineLoadVarianceAlgorithm
This class defines a load variance algorithm that may be used to increase or
decrease the number of active threads using curves based on various sections
of the sine wave.
Each invocation of this load variance algorithm should consist of two
tab-delimited components. The first should be one of the following strings:
| Field Summary | |
static int |
METHOD_DECREASE_BY_NUMBER
The variation method that indicates that the number of active threads should be decreased by a fixed amount. |
static int |
METHOD_DECREASE_BY_PERCENT
The variation method that indicates that the number of active threads should be decreased by a percentage of the total number of threads. |
static int |
METHOD_INCREASE_BY_NUMBER
The variation method that indicates that the number of active threads should be increased by a fixed amount. |
static int |
METHOD_INCREASE_BY_PERCENT
The variation method that indicates that the number of active threads should be increased by a percentage of the total number of threads. |
static int |
METHOD_SET_TO_NUMBER
The variation method that indicates that the number of active threads should be set to a fixed number. |
static int |
METHOD_SET_TO_PERCENT
The variation method that indicates that the number of active threads should be set to a percentage of the total number of threads. |
static double |
PI
A predefined constant that can make some of the formulas a little shorter. |
static int |
SHAPE_CONCAVE
The shape value that indicates that the resulting curve should open downward. |
static int |
SHAPE_CONVEX
The shape value that indicates that the resulting curve should open upward. |
| Constructor Summary | |
SineLoadVarianceAlgorithm()
This constructor is used to create a new instance of this load variation algorithm through reflection. |
|
| Method Summary | |
int[][] |
calculateVariance(int duration,
int totalThreads,
int activeThreads)
Retrieves a two-dimensional array that provides information about the increase or decrease in active job threads that should be applied over time. |
void |
initializeVariationAlgorithm(java.lang.String[] arguments)
Initializes this load variation algorithm based on the provided list of arguments. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final double PI
public static final int SHAPE_CONCAVE
public static final int SHAPE_CONVEX
public static final int METHOD_INCREASE_BY_NUMBER
public static final int METHOD_DECREASE_BY_NUMBER
public static final int METHOD_INCREASE_BY_PERCENT
public static final int METHOD_DECREASE_BY_PERCENT
public static final int METHOD_SET_TO_NUMBER
public static final int METHOD_SET_TO_PERCENT
| Constructor Detail |
public SineLoadVarianceAlgorithm()
super().
| Method Detail |
public void initializeVariationAlgorithm(java.lang.String[] arguments)
throws SLAMDException
initializeVariationAlgorithm in class LoadVarianceAlgorithmarguments - The arguments that may be used to customize the behavior
of this load variation algorithm.
SLAMDException - If a problem occurs while trying to initialize
this load variation algorithm.
public int[][] calculateVariance(int duration,
int totalThreads,
int activeThreads)
throws SLAMDException
calculateVariance in class LoadVarianceAlgorithmduration - The length of time in seconds over which this load
variance algorithm should operate.totalThreads - The total number of threads that have been scheduled
for the job with which this algorithm is to be used.activeThreads - The number of threads that are already active at
the time that this method is called.
SLAMDException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||