systeminformationmonitor.system.sigar
Class SigarHolder

java.lang.Object
  extended by systeminformationmonitor.system.sigar.SigarHolder

public class SigarHolder
extends java.lang.Object

SigarHold is a container class for Sigar Proxy and Sigar. It contains a single instance of Sigar and Sigar Proxy. This class should be used to reference any sigar related api call to ensure thread safety.


Field Summary
 int LONG_SLEEP_TIME
           
 int NORMAL_SLEEP_TIME
           
 int SHORT_SLEEP_TIME
           
 
Method Summary
static void clearCache()
          Purge all data stored inside the Sigar instance, this will force Sigar Proxy to reload.
static org.hyperic.sigar.SigarProxy getInstance()
          Return an instance of Sigar Proxy.
static org.hyperic.sigar.Sigar getNonCachedInstance()
          Return an instance of Sigar, this instance is not cached and it is not thread safe.
static void setSleepTime(int sleepTime)
          Set amount of time the Sigar proxy should reload it self.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHORT_SLEEP_TIME

public final int SHORT_SLEEP_TIME
See Also:
Constant Field Values

NORMAL_SLEEP_TIME

public final int NORMAL_SLEEP_TIME
See Also:
Constant Field Values

LONG_SLEEP_TIME

public final int LONG_SLEEP_TIME
See Also:
Constant Field Values
Method Detail

getInstance

public static org.hyperic.sigar.SigarProxy getInstance()
Return an instance of Sigar Proxy.

Returns:
an instance of Sigar Proxy

getNonCachedInstance

public static org.hyperic.sigar.Sigar getNonCachedInstance()
Return an instance of Sigar, this instance is not cached and it is not thread safe. Should externally guard it with locks.

Returns:
an instance of sigar

clearCache

public static void clearCache()
Purge all data stored inside the Sigar instance, this will force Sigar Proxy to reload.


setSleepTime

public static void setSleepTime(int sleepTime)
Set amount of time the Sigar proxy should reload it self.

Parameters:
sleepTime - time until reload.