Rio Project 4.2 API Documentation



org.rioproject.system.measurable.memory
Class ProcessMemoryMonitor

java.lang.Object
  extended by org.rioproject.system.measurable.memory.ProcessMemoryMonitor
All Implemented Interfaces:
MeasurableMonitor, MXBeanMonitor<MemoryMXBean>

public class ProcessMemoryMonitor
extends Object
implements MXBeanMonitor<MemoryMXBean>

The ProcessMemoryMonitor object provides feedback information to the Memory object, providing memory usage information for a process obtained using JMX and SIGAR. SIGAR is used to obtain the process shared, virtual and real memory size.

JMX is used to obtain detailed information on heap and non-heap usage. If SIGAR is not available, only JMX will be used.

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
ProcessMemoryMonitor()
           
ProcessMemoryMonitor(int pid)
           
 
Method Summary
 MeasuredResource getLastMeasuredResource()
           
 MeasuredResource getMeasuredResource()
          Get the MeasuredResource
 MemoryMXBean getMXBean()
           
 void setID(String id)
          Set the identifier for the resource being measured
 void setMXBean(MemoryMXBean mxBean)
          Set the platform MBean to monitor
 void setPID(long pid)
           
 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

ProcessMemoryMonitor

public ProcessMemoryMonitor()

ProcessMemoryMonitor

public ProcessMemoryMonitor(int pid)
Method Detail

setPID

public void setPID(long pid)

terminate

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

Specified by:
terminate in interface MeasurableMonitor

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
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
Parameters:
tVals - The ThresholdValues

getLastMeasuredResource

public MeasuredResource getLastMeasuredResource()

getMeasuredResource

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

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

setMXBean

public void setMXBean(MemoryMXBean mxBean)
Description copied from interface: MXBeanMonitor
Set the platform MBean to monitor

Specified by:
setMXBean in interface MXBeanMonitor<MemoryMXBean>
Parameters:
mxBean - The platform MBean

getMXBean

public MemoryMXBean getMXBean()

Copyright © Rio Project.

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