Rio Project 4.2 API Documentation



org.rioproject.watch
Class ThresholdValues

java.lang.Object
  extended by org.rioproject.watch.ThresholdValues
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
SLA

public class ThresholdValues
extends Object
implements Serializable, Cloneable

ThresholdValues provides attributes for thresholds which can be applied to a Watch

See Also:
Serialized Form

Constructor Summary
ThresholdValues()
          Create a new ThresholdValues
ThresholdValues(double... range)
          Create a new ThresholdValues
ThresholdValues(double lowThreshold, double highThreshold)
          Create a new ThresholdValues
 
Method Summary
 Object clone()
           
 double getCurrentHighThreshold()
          Getter for property currentHighThreshold.
 double getCurrentLowThreshold()
          Getter for property currentLowThreshold.
 double getHighThreshold()
          Getter for property highThreshold.
 double getLowThreshold()
          Getter for property lowThreshold.
 long getThresholdBreachedCount()
          Gets the count of breached thresholds
 long getThresholdClearedCount()
          Gets the count of cleared thresholds
 void incThresholdBreachedCount()
          Increments the count of breached thresholds
 void incThresholdClearedCount()
          Increments the count of cleared thresholds
 void resetHighThreshold()
          Reset the currentHighThreshold to tbe original highThreshold value
 void resetLowThreshold()
          Reset the currentLowThreshold to tbe original lowThreshold value
 void setCurrentHighThreshold(double threshold)
          Setter for property currentHighThreshold.
 void setCurrentLowThreshold(double threshold)
          Setter for property currentHighThreshold.
 void setHighThreshold(double highThreshold)
          Setter for property highThreshold.
 void setLowThreshold(double lowThreshold)
          Setter for property lowThreshold.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThresholdValues

public ThresholdValues()
Create a new ThresholdValues


ThresholdValues

public ThresholdValues(double... range)
Create a new ThresholdValues

Parameters:
range - Array of double values indicating the range of acceptable lower and upper thresholds

ThresholdValues

public ThresholdValues(double lowThreshold,
                       double highThreshold)
Create a new ThresholdValues

Parameters:
lowThreshold - The low threshold
highThreshold - The high threshold value
Method Detail

setHighThreshold

public void setHighThreshold(double highThreshold)
Setter for property highThreshold.

Parameters:
highThreshold - Value of property highThreshold. This method will also set the currentHighThreshold property equal to the highThreshold

getHighThreshold

public double getHighThreshold()
Getter for property highThreshold.

Returns:
Value of property highThreshold.

setLowThreshold

public void setLowThreshold(double lowThreshold)
Setter for property lowThreshold.

Parameters:
lowThreshold - Value of property lowThreshold. This method will also set the currentLowThreshold property equal to the lowThreshold

getLowThreshold

public double getLowThreshold()
Getter for property lowThreshold.

Returns:
Value of property lowThreshold.

getCurrentHighThreshold

public double getCurrentHighThreshold()
Getter for property currentHighThreshold.

Returns:
Value of property currentHighThreshold.

setCurrentHighThreshold

public void setCurrentHighThreshold(double threshold)
Setter for property currentHighThreshold.

Parameters:
threshold - New value of property currentHighThreshold.

getCurrentLowThreshold

public double getCurrentLowThreshold()
Getter for property currentLowThreshold.

Returns:
Value of property currentLowThreshold.

setCurrentLowThreshold

public void setCurrentLowThreshold(double threshold)
Setter for property currentHighThreshold.

Parameters:
threshold - New value of property currentHighThreshold.

resetLowThreshold

public void resetLowThreshold()
Reset the currentLowThreshold to tbe original lowThreshold value


resetHighThreshold

public void resetHighThreshold()
Reset the currentHighThreshold to tbe original highThreshold value


incThresholdBreachedCount

public void incThresholdBreachedCount()
Increments the count of breached thresholds


getThresholdBreachedCount

public long getThresholdBreachedCount()
Gets the count of breached thresholds

Returns:
The count of breached thresholds

incThresholdClearedCount

public void incThresholdClearedCount()
Increments the count of cleared thresholds


getThresholdClearedCount

public long getThresholdClearedCount()
Gets the count of cleared thresholds

Returns:
The count of cleared thresholds

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

Copyright © Rio Project.

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