Rio Project 4.2 API Documentation



org.rioproject.system.measurable.memory.pool
Class MemoryPool

java.lang.Object
  extended by org.rioproject.watch.Watch
      extended by org.rioproject.watch.ThresholdWatch
          extended by org.rioproject.watch.PeriodicWatch
              extended by org.rioproject.system.measurable.MeasurableCapability
                  extended by org.rioproject.system.measurable.memory.pool.MemoryPool
All Implemented Interfaces:
ResourceCostProducer, MeasurableCapabilityMBean, PeriodicWatchMBean, ThresholdWatchMBean, WatchMBean

public class MemoryPool
extends MeasurableCapability

The MemoryPool is used to monitor a JMX memory pool.


Field Summary
 
Fields inherited from class org.rioproject.system.measurable.MeasurableCapability
lastMeasured, sampleSize
 
Fields inherited from class org.rioproject.watch.PeriodicWatch
DEFAULT_PERIOD
 
Fields inherited from class org.rioproject.watch.Watch
DEFAULT_VIEW, id, localRef, watchDataSource
 
Constructor Summary
MemoryPool(String id, Configuration config, ThresholdValues thresholdValues)
          Construct a MemoryPool object
 
Method Summary
 void checkValue()
          Abstract method to check the watch's value at the periodic interval
protected  MeasurableMonitor<MemoryPoolUtilization> createMeasurableMonitor(String id)
           
 double getUtilization()
          Provide a method to return the utilization associated with this MeasurableCapability
 void start()
          Override PeriodicWatch.start() to get an initial reading prior to scheduling
 
Methods inherited from class org.rioproject.system.measurable.MeasurableCapability
addSecondaryThresholdManager, addWatchRecord, calculateResourceCost, getConfiguration, getMeasuredResource, getObservable, getSampleSize, getSLA, getThresholdManagers, isEnabled, removeSecondaryThresholdManager, setEnabled, setLastMeasuredResource, setMeasurableMonitor, setResourceCostModel, setSampleSize, setSLA, setWatchDataSource
 
Methods inherited from class org.rioproject.watch.PeriodicWatch
getPeriod, setPeriod, stop
 
Methods inherited from class org.rioproject.watch.ThresholdWatch
addThresholdListener, getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdManager, getThresholdValues, removeThresholdListener, setCurrentHighThreshold, setCurrentLowThreshold, setThresholdValues
 
Methods inherited from class org.rioproject.watch.Watch
clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, main, setView, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rioproject.watch.PeriodicWatchMBean
getPeriod, setPeriod, stop
 
Methods inherited from interface org.rioproject.watch.ThresholdWatchMBean
getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, setCurrentHighThreshold, setCurrentLowThreshold
 
Methods inherited from interface org.rioproject.watch.WatchMBean
clear, getCalculables, getId, getLastCalculableValue
 

Constructor Detail

MemoryPool

public MemoryPool(String id,
                  Configuration config,
                  ThresholdValues thresholdValues)
Construct a MemoryPool object

Parameters:
id - Identifier to use
config - Configuration object
thresholdValues - ThresholdValues to use
Method Detail

getUtilization

public double getUtilization()
Description copied from interface: MeasurableCapabilityMBean
Provide a method to return the utilization associated with this MeasurableCapability


start

public void start()
Override PeriodicWatch.start() to get an initial reading prior to scheduling

Specified by:
start in interface PeriodicWatchMBean
Overrides:
start in class PeriodicWatch
See Also:
PeriodicWatchMBean.start()

checkValue

public void checkValue()
Description copied from interface: PeriodicWatchMBean
Abstract method to check the watch's value at the periodic interval


createMeasurableMonitor

protected MeasurableMonitor<MemoryPoolUtilization> createMeasurableMonitor(String id)

Copyright © Rio Project.

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