eu.reservoir.monitoring.appl
Class DynamicControl

java.lang.Object
  extended by eu.reservoir.monitoring.appl.DynamicControl
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
HypervisorCache, HypervisorControl

public abstract class DynamicControl
extends java.lang.Object
implements java.lang.Runnable

A Dynamic Control. This runs in its own Thread, and allows subclasses to provide initialize, cleanup, and an evaluation function.


Constructor Summary
DynamicControl(java.lang.String name)
           
 
Method Summary
 void activateControl()
          Activate the DynamicControl thread.
protected abstract  void controlCleanup()
          Cleanup
protected abstract  void controlEvaluate()
          Actually evaluate something.
protected abstract  void controlInitialize()
          Initialize.
 void deactivateControl()
          Deactivate the DynamicControl thread.
 int getElapsedTime()
          Get the amount of elapsedTime.
 java.lang.String getName()
          The name
 int getSleepTime()
          Get the sleep time between activations.
 boolean isRunning()
          Is the Thread running
 void run()
          The run method of the Runnable, which wakes up from time to time and determines if a Probe should be created or destroyed.
 DynamicControl setSleepTime(int sl)
          Set the sleep time between activations.
protected  void sleep()
          Actualy sleep.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicControl

public DynamicControl(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
The name


getSleepTime

public int getSleepTime()
Get the sleep time between activations. This is in seconds.


setSleepTime

public DynamicControl setSleepTime(int sl)
Set the sleep time between activations. This is in seconds.


getElapsedTime

public int getElapsedTime()
Get the amount of elapsedTime. This is in milliseconds.


run

public void run()
The run method of the Runnable, which wakes up from time to time and determines if a Probe should be created or destroyed.

Specified by:
run in interface java.lang.Runnable

sleep

protected void sleep()
              throws java.lang.InterruptedException
Actualy sleep.

Throws:
java.lang.InterruptedException

controlInitialize

protected abstract void controlInitialize()
Initialize.


controlEvaluate

protected abstract void controlEvaluate()
Actually evaluate something.


controlCleanup

protected abstract void controlCleanup()
Cleanup


activateControl

public void activateControl()
Activate the DynamicControl thread.


deactivateControl

public void deactivateControl()
Deactivate the DynamicControl thread.


isRunning

public boolean isRunning()
Is the Thread running



RESERVOIR Monitoring 0.6.4