com.sun.slamd.loadvariance
Class LoadVarianceControlThread

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.sun.slamd.loadvariance.LoadVarianceControlThread
All Implemented Interfaces:
java.lang.Runnable

public class LoadVarianceControlThread
extends java.lang.Thread

This class defines a thread that is used to keep track of when the actual job threads should start and stop their processing (which may need to happen several times over the course of a job). It does this by setting boolean variables that the job should watch in order to determine whether it should currently be running.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LoadVarianceControlThread(LoadVarianceJobClass jobClass)
          Creates a new instance of this load variance control thread that will be used to manage the provided job class.
 
Method Summary
 void run()
          Waits for the actual job to start, then sets flags that will be read by that job to indicate whether a given thread should be started or stopped.
 void startRunning()
          Sets a flag that indicates that the control thread should start managing the job.
 void stopRunning()
          Sets a flag that indicates that the control thread should stop managing the job.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, 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
 

Constructor Detail

LoadVarianceControlThread

public LoadVarianceControlThread(LoadVarianceJobClass jobClass)
Creates a new instance of this load variance control thread that will be used to manage the provided job class.

Parameters:
jobClass - The job class that this control thread will manage.
Method Detail

startRunning

public void startRunning()
Sets a flag that indicates that the control thread should start managing the job.


stopRunning

public void stopRunning()
Sets a flag that indicates that the control thread should stop managing the job.


run

public void run()
Waits for the actual job to start, then sets flags that will be read by that job to indicate whether a given thread should be started or stopped.