Rio Project 4.2 API Documentation



org.rioproject.system.measurable.disk
Class DiskSpaceMonitor

java.lang.Object
  extended by org.rioproject.system.measurable.disk.DiskSpaceMonitor
All Implemented Interfaces:
MeasurableMonitor<DiskSpaceUtilization>

public class DiskSpaceMonitor
extends Object
implements MeasurableMonitor<DiskSpaceUtilization>

The DiskSpaceMonitor monitors disk space usage. This class uses either Hyperic SIGAR, or operations system specific utilities (like df) to obtain this information. The use of SIGAR is preferred, and if not available will use external df exec by forking a process and parsing it's results.

Note: Hyperic SIGAR is licensed under the GPL with a FLOSS license exception, allowing it to be included with the Rio Apache License v2 distribution. If for some reason the GPL cannot be used with your distribution of Rio, remove the RIO_HOME/lib/hyperic directory.

Author:
Dennis Reedy

Constructor Summary
DiskSpaceMonitor()
           
 
Method Summary
 DiskSpaceUtilization getMeasuredResource()
          Get the MeasuredResource
 void setFileSystemToMonitor(String fileSystem)
           
 void setID(String id)
          Set the identifier for the resource being measured
 void setThresholdValues(ThresholdValues tVals)
          Set the ThresholdValues for the resource being measured
 void terminate()
          Terminate any collection mechanisms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskSpaceMonitor

public DiskSpaceMonitor()
Method Detail

setID

public void setID(String id)
Description copied from interface: MeasurableMonitor
Set the identifier for the resource being measured

Specified by:
setID in interface MeasurableMonitor<DiskSpaceUtilization>
Parameters:
id - The identifier

setThresholdValues

public void setThresholdValues(ThresholdValues tVals)
Description copied from interface: MeasurableMonitor
Set the ThresholdValues for the resource being measured

Specified by:
setThresholdValues in interface MeasurableMonitor<DiskSpaceUtilization>
Parameters:
tVals - The ThresholdValues

setFileSystemToMonitor

public void setFileSystemToMonitor(String fileSystem)

getMeasuredResource

public DiskSpaceUtilization getMeasuredResource()
Description copied from interface: MeasurableMonitor
Get the MeasuredResource

Specified by:
getMeasuredResource in interface MeasurableMonitor<DiskSpaceUtilization>
Returns:
The MeasuredResource for the MeasurableMonitor

terminate

public void terminate()
Description copied from interface: MeasurableMonitor
Terminate any collection mechanisms

Specified by:
terminate in interface MeasurableMonitor<DiskSpaceUtilization>

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.