Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.jini.rio.watch.Watch
          org.jini.rio.watch.ThresholdWatch
              org.jini.rio.watch.PeriodicWatch
                  org.jini.rio.qos.measurable.MeasurableCapability
                      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
`DEFAULT_VIEW, id, localRef, watchDataSource`

Constructor Summary
`CPU(Configuration config)` Construct a new CPU object
`CPU(Configuration config, String id, int pid)` 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

### CPU

    public CPU(Configuration config,
               String id,
               int pid)

  Construct a new CPU object

  Parameters:
    `config` - Configuration object
    `id` - The identifiwe for the CPU watch
    `pid` - The process ID of the JVM. If this value is not >0, it means we dont have a pid that we can used

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.