eu.reservoir.monitoring.appl.hypervisor
Class HypervisorCache

java.lang.Object
  extended by eu.reservoir.monitoring.appl.DynamicControl
      extended by eu.reservoir.monitoring.appl.hypervisor.HypervisorCache
All Implemented Interfaces:
java.lang.Runnable

public class HypervisorCache
extends DynamicControl

This class caches data from a hypervisor.


Constructor Summary
HypervisorCache(java.lang.String hypervisorURI)
          Construct a HypervisorCache and a hypervisor URI such as "xen:///"
 
Method Summary
protected  void controlCleanup()
          Cleanup
protected  void controlEvaluate()
          Actually evaluate something.
protected  void controlInitialize()
          Initialize this hypervisor cache It connects to the hypervisor
 CachedDomain domainLookupByID(int id)
          Get a domain by it's id.
protected  void getDomainData(org.libvirt.Domain domain, CachedDomain cachedDomain)
          Get cached domain data.
 int[] listDomains()
          Get the list of domain ids.
static void main(java.lang.String[] args)
          Main entry point.
 int numOfDomains()
          Get the number of domains
 void waitForCacheReady()
          Wait for the cache to be ready.
 
Methods inherited from class eu.reservoir.monitoring.appl.DynamicControl
activateControl, deactivateControl, getElapsedTime, getName, getSleepTime, isRunning, run, setSleepTime, sleep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HypervisorCache

public HypervisorCache(java.lang.String hypervisorURI)
Construct a HypervisorCache and a hypervisor URI such as "xen:///"

Method Detail

controlInitialize

protected void controlInitialize()
Initialize this hypervisor cache It connects to the hypervisor

Specified by:
controlInitialize in class DynamicControl

controlEvaluate

protected void controlEvaluate()
Actually evaluate something.

Specified by:
controlEvaluate in class DynamicControl

waitForCacheReady

public void waitForCacheReady()
Wait for the cache to be ready. This is after the first read of the Hypervisor info.


controlCleanup

protected void controlCleanup()
Cleanup

Specified by:
controlCleanup in class DynamicControl

getDomainData

protected void getDomainData(org.libvirt.Domain domain,
                             CachedDomain cachedDomain)
                      throws org.libvirt.LibvirtException
Get cached domain data.

Throws:
org.libvirt.LibvirtException

listDomains

public int[] listDomains()
Get the list of domain ids.


numOfDomains

public int numOfDomains()
Get the number of domains


domainLookupByID

public CachedDomain domainLookupByID(int id)
Get a domain by it's id.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main entry point.

Throws:
java.lang.Exception


RESERVOIR Monitoring 0.6.4