|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.sun.slamd.job.JobClass
com.sun.slamd.loadvariance.LoadVarianceJobClass
com.sun.slamd.loadvariance.LoadVarianceTestJobClass
This class defines a very simple SLAMD job that can be used to test load variance algorithms. It does not generate any actual load, but rather simply has each thread increment a counter at regular intervals so that the graph created from that statistic should have the desired appearance.
| Field Summary | |
static java.lang.String |
STAT_TRACKER_COUNTER_INCREMENTS
The display name of the stat tracker that will be incremented to define the overall shape of the load definition. |
| Fields inherited from class com.sun.slamd.loadvariance.LoadVarianceJobClass |
DEFAULT_IDLE_SLEEP_DURATION, PARAM_LOAD_DEFINITION |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
LoadVarianceTestJobClass()
The default constructor used to create a new instance of the search thread. |
|
| Method Summary | |
void |
doProcessing()
Performs the actual processing for this job. |
void |
doShutdown()
Performs any processing that should be done at the very end of execution after all actual processing has completed. |
void |
doStartup()
Performs any processing that should be done at the very beginning of execution before any actual processing is performed. |
java.lang.String |
getJobCategoryName()
Retrieves the name of the category in which this job class exists. |
java.lang.String |
getJobDescription()
Retrieves a description of the job performed by this job thread. |
java.lang.String |
getJobName()
Retrieves the name of the job performed by this job thread. |
ParameterList |
getParameterStubs()
Retrieve a parameter list that can be used to determine all of the customizeable options that are available for this job. |
StatTracker[] |
getStatTrackers()
Retrieves the stat trackers that are maintained for this job thread. |
StatTracker[] |
getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
Retrieves the set of stat trackers that will be maintained by this job class. |
void |
initializeClient(java.lang.String clientID,
ParameterList parameters)
Initializes all of the instance variables that correspond to job parameters. |
void |
initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
Initializes this job thread to be used to actually run the job on the client. |
void |
validateJobInfo(int numClients,
int threadsPerClient,
int threadStartupDelay,
java.util.Date startTime,
java.util.Date stopTime,
int duration,
int collectionInterval,
ParameterList parameters)
Provides a means of validating the information used to schedule the job, including the scheduling information and list of parameters. |
| Methods inherited from class com.sun.slamd.loadvariance.LoadVarianceJobClass |
getIdleSleepDuration, getVariableLoadParameterStub, initializeVariableLoad, loopVarianceDefinition, runJob, setIdleSleepDuration, setLoopVarianceDefinition, shouldPauseOrStop, validateLoadDefinition |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String STAT_TRACKER_COUNTER_INCREMENTS
| Constructor Detail |
public LoadVarianceTestJobClass()
initialize
method.
| Method Detail |
public java.lang.String getJobName()
getJobName in class JobClasspublic java.lang.String getJobDescription()
getJobDescription in class JobClasspublic java.lang.String getJobCategoryName()
getJobCategoryName in class JobClasspublic ParameterList getParameterStubs()
getParameterStubs in class JobClass
public StatTracker[] getStatTrackerStubs(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval)
getStatTrackerStubs in class JobClassclientID - The client ID that should be used for the
returned stat trackers.threadID - The thread ID that should be used for the
returned stat trackers.collectionInterval - The collection interval that should be used for
the returned stat trackers.
public StatTracker[] getStatTrackers()
getStatTrackers in class JobClass
public void validateJobInfo(int numClients,
int threadsPerClient,
int threadStartupDelay,
java.util.Date startTime,
java.util.Date stopTime,
int duration,
int collectionInterval,
ParameterList parameters)
throws InvalidValueException
validateJobInfo in class JobClassnumClients - The number of clients that should be used to
run the job.threadsPerClient - The number of threads that should be created on
each client to run the job.threadStartupDelay - The delay in milliseconds that should be used
when starting the client threads.startTime - The time that the job should start running.stopTime - The time that the job should stop running.duration - The maximum length of time in seconds that the
job should be allowed to run.collectionInterval - The collection interval that should be used
when gathering statistics for the job.parameters - The set of parameters provided to this job that
can be used to customize its behavior.
InvalidValueException - If the provided information is not
appropriate for running this job.
public void initializeClient(java.lang.String clientID,
ParameterList parameters)
throws UnableToRunException
initializeClient in class JobClassclientID - The client ID for the current client.parameters - The set of parameters that have been defined for this
job.
UnableToRunException - If any part of the initialization fails.
public void initializeThread(java.lang.String clientID,
java.lang.String threadID,
int collectionInterval,
ParameterList parameters)
throws UnableToRunException
initializeThread in class JobClassclientID - The client ID for this job thread.threadID - The thread ID for this job thread.collectionInterval - The length of time in seconds to use as the
statistics collection interval.parameters - The set of parameters provided to this job that
can be used to customize its behavior.
UnableToRunException - If a problem occurs that prevents the thread
from being able to run properly.public void doStartup()
doStartup in class LoadVarianceJobClasspublic void doShutdown()
doShutdown in class LoadVarianceJobClasspublic void doProcessing()
shouldPauseOrStop method and if it returns
true then this method should exit.
doProcessing in class LoadVarianceJobClass
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||