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.watch
Class ThresholdWatch

    java.lang.Object
      org.jini.rio.watch.Watch
          org.jini.rio.watch.ThresholdWatch

All Implemented Interfaces:
  ThresholdWatchMBean, WatchMBean

Direct Known Subclasses:
  CounterWatch, GaugeWatch, PeriodicWatch, StopWatch

    public abstract class ThresholdWatch

extends Watch
implements ThresholdWatchMBean

A Watch that provides threshold processing semantics

Field Summary

Fields inherited from class org.jini.rio.watch.Watch
`DEFAULT_VIEW, id, localRef, logger, watchDataSource`

Constructor Summary
`ThresholdWatch(String id)` Create a new ThresholdWatch
`ThresholdWatch(String id, Archivable archivable, Configuration config)` Creates new ThresholdWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided
`ThresholdWatch(String id, Configuration config)` Creates new ThresholdWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided
`ThresholdWatch(WatchDataSource watchDataSource, String id)` Create a new ThresholdWatch

Method Summary
`void` | `addThresholdListener(ThresholdListener listener)` Add a ThresholdListener
`void` | `addWatchRecord(Calculable record)` Override parent's addRecord to check for threshold(s) being crossed
`long` | `getBreachedCount()` Get the number of times the threshold has been breached
`long` | `getClearedCount()` Get the number of times the threshold has been cleared
`double` | `getCurrentHighThreshold()` Get the current high threshold value
`double` | `getCurrentLowThreshold()` Get the current low threshold value
`double` | `getHighThreshold()` Get the high threshold value
`double` | `getLowThreshold()` Get the low threshold value
`ThresholdManager` | `getThresholdManager()` Get the ThresholdManager for the ThresholdWatch
`ThresholdValues` | `getThresholdValues()` Get the ThresholdValues from the ThresholdManager
`void` | `removeThresholdListener(ThresholdListener listener)` Remove a ThresholdListener
`void` | `setCurrentHighThreshold(double threshold)` Get the current high threshold value
`void` | `setCurrentLowThreshold(double threshold)` Set the low threshold value
`void` | `setThresholdValues(ThresholdValues tValues)` Set the ThresholdValues for the ThresholdManager

Methods inherited from class org.jini.rio.watch.Watch
`clear, equals, getCalculables, getId, getLastCalculableValue, getView, getWatchDataSource, hashCode, main, setView, setWatchDataSource, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.jini.rio.watch.WatchMBean
`clear, getCalculables, getId, getLastCalculableValue`

Constructor Detail

### ThresholdWatch

    public ThresholdWatch(String id)

  Create a new ThresholdWatch

  Parameters:
    `id` - The identifier for this watch

### ThresholdWatch

    public ThresholdWatch(String id,
                          Configuration config)

  Creates new ThresholdWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided

  Parameters:
    `id` - The identifier for this watch
    `config` - Configuration object used for constructing a WatchDataSource

### ThresholdWatch

    public ThresholdWatch(String id,
                          Archivable archivable,
                          Configuration config)

  Creates new ThresholdWatch, creates and exports a WatchDataSourceImpl if the WatchDataSource is null using the Configuration object provided

  Parameters:
    `id` - The identifier for this watch
    `archivable` - The Archivable
    `config` - Configuration object used for constructing a WatchDataSource

### ThresholdWatch

    public ThresholdWatch(WatchDataSource watchDataSource,
                          String id)

  Create a new ThresholdWatch

  Parameters:
    `watchDataSource` - The watch data source associated with this watch
    `id` - The identifier for this watch

Method Detail

### getThresholdManager

    public ThresholdManager getThresholdManager()

  Get the ThresholdManager for the ThresholdWatch

  Returns:
    The ThresholdManager for the ThresholdWatch. The ThresholdManager is the keeper of ThresholdValues and determines when Calculable items exceed thresholds and provides specific behavior processing to assist in threshold management processing

### addThresholdListener

    public void addThresholdListener(ThresholdListener listener)

  Add a ThresholdListener

  Parameters:
    `listener` - Thre ThresholdListener

### removeThresholdListener

    public void removeThresholdListener(ThresholdListener listener)

  Remove a ThresholdListener

  Parameters:
    `listener` - The ThresholdListener

### setThresholdValues

    public void setThresholdValues(ThresholdValues tValues)

  Set the ThresholdValues for the ThresholdManager

  Parameters:
    `tValues` - The ThresholdValues

### getThresholdValues

    public ThresholdValues getThresholdValues()

  Get the ThresholdValues from the ThresholdManager

  Returns:
    ThresholdValues The ThresholdValues

### addWatchRecord

    public void addWatchRecord(Calculable record)

  Override parent's addRecord to check for threshold(s) being crossed

  Overrides:
    `addWatchRecord` in class `Watch`
  Parameters:
    `record` - the Calculable record to be added

### getHighThreshold

    public double getHighThreshold()

  Description copied from interface: `ThresholdWatchMBean`
  Get the high threshold value

  Specified by:
    `getHighThreshold` in interface `ThresholdWatchMBean`
  Returns:
    The high threshold value
  See Also:
    `ThresholdWatchMBean.getHighThreshold()`

### getLowThreshold

    public double getLowThreshold()

  Description copied from interface: `ThresholdWatchMBean`
  Get the low threshold value

  Specified by:
    `getLowThreshold` in interface `ThresholdWatchMBean`
  Returns:
    The low threshold value
  See Also:
    `ThresholdWatchMBean.getLowThreshold()`

### getCurrentHighThreshold

    public double getCurrentHighThreshold()

  Description copied from interface: `ThresholdWatchMBean`
  Get the current high threshold value

  Specified by:
    `getCurrentHighThreshold` in interface `ThresholdWatchMBean`
  Returns:
    The current high threshold value
  See Also:
    `ThresholdWatchMBean.getCurrentHighThreshold()`

### setCurrentHighThreshold

    public void setCurrentHighThreshold(double threshold)

  Description copied from interface: `ThresholdWatchMBean`
  Get the current high threshold value

  Specified by:
    `setCurrentHighThreshold` in interface `ThresholdWatchMBean`
  Parameters:
    `threshold` - The current high threshold value
  See Also:
    `ThresholdWatchMBean.setCurrentHighThreshold(double)`

### setCurrentLowThreshold

    public void setCurrentLowThreshold(double threshold)

  Description copied from interface: `ThresholdWatchMBean`
  Set the low threshold value

  Specified by:
    `setCurrentLowThreshold` in interface `ThresholdWatchMBean`
  Parameters:
    `threshold` - The threshold value
  See Also:
    `ThresholdWatchMBean.setCurrentLowThreshold(double)`

### getCurrentLowThreshold

    public double getCurrentLowThreshold()

  Description copied from interface: `ThresholdWatchMBean`
  Get the current low threshold value

  Specified by:
    `getCurrentLowThreshold` in interface `ThresholdWatchMBean`
  Returns:
    The current low threshold value
  See Also:
    `ThresholdWatchMBean.getCurrentLowThreshold()`

### getBreachedCount

    public long getBreachedCount()

  Description copied from interface: `ThresholdWatchMBean`
  Get the number of times the threshold has been breached

  Specified by:
    `getBreachedCount` in interface `ThresholdWatchMBean`
  Returns:
    The number of times the threshold has been breached
  See Also:
    `ThresholdWatchMBean.getBreachedCount()`

### getClearedCount

    public long getClearedCount()

  Description copied from interface: `ThresholdWatchMBean`
  Get the number of times the threshold has been cleared

  Specified by:
    `getClearedCount` in interface `ThresholdWatchMBean`
  Returns:
    The number of times the threshold has been cleared
  See Also:
    `ThresholdWatchMBean.getClearedCount()`

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.