org.jini.rio.qos.measurable.cpu
Class CPU

java.lang.Object
  extended by org.jini.rio.watch.Watch
      extended by org.jini.rio.watch.ThresholdWatch
          extended by org.jini.rio.watch.PeriodicWatch
              extended by org.jini.rio.qos.measurable.MeasurableCapability
                  extended by org.jini.rio.qos.measurable.cpu.CPU
All Implemented Interfaces:
ResourceCostProducer, MeasurableCapabilityMBean, PeriodicWatchMBean, ThresholdWatchMBean, WatchMBean

public class CPU
extends MeasurableCapability

The CPU object is a MeasurableCapability which refers to the platform's capability describing CPU utilization, capacity, and load.


Field Summary
static String VIEW
           
 
Fields inherited from class org.jini.rio.qos.measurable.MeasurableCapability
sampleSize
 
Fields inherited from class org.jini.rio.watch.PeriodicWatch
DEFAULT_PERIOD
 
Fields inherited from class org.jini.rio.watch.Watch
id, localRef, watchDataSource
 
Constructor Summary
CPU(Configuration config)
          Construct a new CPU object
 
Method Summary
 void checkValue()
          Abstract method to check the watch's value at the periodic interval
 double getUtilization()
          Get the computed utilization for this CPU object
static void main(String[] argv)
          Test the CPU
 
Methods inherited from class org.jini.rio.qos.measurable.MeasurableCapability
addSecondaryThresholdManager, addWatchRecord, calculateResourceCost, getConfiguration, getMeasuredResource, getObservable, getSampleSize, getSLA, removeSecondaryThresholdManager, setResourceCostModel, setSampleSize, setSLA, setWatchDataSource
 
Methods inherited from class org.jini.rio.watch.PeriodicWatch
getPeriod, setPeriod, start, stop
 
Methods inherited from class org.jini.rio.watch.ThresholdWatch
addThresholdListener, getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdManager, getThresholdValues, removeThresholdListener, setCurrentHighThreshold, setCurrentLowThreshold, setThresholdValues
 
Methods inherited from class org.jini.rio.watch.Watch
clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, setView, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jini.rio.watch.PeriodicWatchMBean
getPeriod, setPeriod, start, stop
 
Methods inherited from interface org.jini.rio.watch.ThresholdWatchMBean
getBreachedCount, getClearedCount, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, setCurrentHighThreshold, setCurrentLowThreshold
 
Methods inherited from interface org.jini.rio.watch.WatchMBean
clear, getCalculables, getId, getLastCalculableValue
 

Field Detail

VIEW

public static final String VIEW
See Also:
Constant Field Values
Constructor Detail

CPU

public CPU(Configuration config)
Construct a new CPU object

Parameters:
config - Configuration object
Method Detail

getUtilization

public double getUtilization()
Get the computed utilization for this CPU object

Returns:
Utilization computed for this component

checkValue

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


main

public static void main(String[] argv)
Test the CPU

Parameters:
argv - Command-line style arguments, ignored.


Copyright (c) 2005 Sun Microsystems, Inc.
Copyright (c) 2006 GigaSpaces Technologies, Inc.
All Rights Reserved.