Rio Project 4.2 API Documentation



org.rioproject.sla
Class SLA

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

public class SLA
extends ThresholdValues
implements Serializable

A SLA provides a mechanism to a specify a preferred range of acceptable lower and upper boundaries that fit a specific criteria

Author:
Dennis Reedy
See Also:
Serialized Form

Field Summary
static int UNDEFINED
          Undefined maximum number of services to increment to
 
Constructor Summary
SLA()
          Construct a SLA
SLA(String identifier, double... range)
          Construct a SLA
 
Method Summary
 String getIdentifier()
          Get the identifier of the ThresholdWatch this SLA is for
 long getLowerThresholdDampeningTime()
          Get the dampening value for lower thresholds being crossed.
 int getMaxServices()
          Get the maximum number of services
 String getSlaPolicyHandler()
          Get the SLAPolicyHandler class name to create
 long getUpperThresholdDampeningTime()
          Get the dampening value for upper thresholds being crossed
 WatchDescriptor[] getWatchDescriptors()
          Get the watchDescriptors property
 void setIdentifier(String identifier)
          Set the identifier of the ThresholdWatch this SLA is for
 void setLowerThresholdDampeningTime(long lowerThresholdDampeningTime)
          Set the dampening value for lower thresholds being crossed
 void setMaxServices(int maxServices)
          Set the maximum services property
 void setSlaPolicyHandler(String slaPolicyHandler)
          Set the SLAPolicyHandler class name to create
 void setUpperThresholdDampeningTime(long upperThresholdDampeningTime)
          Set the dampening value for upper thresholds being crossed
 void setWatchDescriptors(WatchDescriptor... watchDescs)
          Set the watchDescriptors property
 String toString()
           
 
Methods inherited from class org.rioproject.watch.ThresholdValues
clone, getCurrentHighThreshold, getCurrentLowThreshold, getHighThreshold, getLowThreshold, getThresholdBreachedCount, getThresholdClearedCount, incThresholdBreachedCount, incThresholdClearedCount, resetHighThreshold, resetLowThreshold, setCurrentHighThreshold, setCurrentLowThreshold, setHighThreshold, setLowThreshold
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
Undefined maximum number of services to increment to

See Also:
Constant Field Values
Constructor Detail

SLA

public SLA()
Construct a SLA


SLA

public SLA(String identifier,
           double... range)
Construct a SLA

Parameters:
identifier - The identifier of the ThresholdWatch class the SLA will be paired with
range - Double values indicating the range of acceptable lower and upper boundaries. There must be two values here, the first the low boundary, the second te high
Method Detail

setIdentifier

public void setIdentifier(String identifier)
Set the identifier of the ThresholdWatch this SLA is for

Parameters:
identifier - The identifier of the ThresholdWatch this SLA is for.

getIdentifier

public String getIdentifier()
Get the identifier of the ThresholdWatch this SLA is for

Returns:
The identifier of the ThresholdWatch this SLA is for. If there is no identifier, this method returns an empty String

getWatchDescriptors

public WatchDescriptor[] getWatchDescriptors()
Get the watchDescriptors property

Returns:
The WatchDescriptor instances configured for this utility. A new array is allocated each time. If there are no WatchDescriptor instances, a zero-length array is returned

setWatchDescriptors

public void setWatchDescriptors(WatchDescriptor... watchDescs)
Set the watchDescriptors property

Parameters:
watchDescs - The WatchDescriptor instances to set.

getUpperThresholdDampeningTime

public long getUpperThresholdDampeningTime()
Get the dampening value for upper thresholds being crossed

Returns:
The dampening value for upper thresholds being crossed. The amount of time to wait until an action is performed on the upper threshold breach.

setUpperThresholdDampeningTime

public void setUpperThresholdDampeningTime(long upperThresholdDampeningTime)
Set the dampening value for upper thresholds being crossed

Parameters:
upperThresholdDampeningTime - The dampening value for upper thresholds being crossed

getLowerThresholdDampeningTime

public long getLowerThresholdDampeningTime()
Get the dampening value for lower thresholds being crossed. The amount of time to wait until an action is performed on the lower threshold breach.

Returns:
The dampening value for lower thresholds being crossed

setLowerThresholdDampeningTime

public void setLowerThresholdDampeningTime(long lowerThresholdDampeningTime)
Set the dampening value for lower thresholds being crossed

Parameters:
lowerThresholdDampeningTime - The dampening value for lower thresholds being crossed

getMaxServices

public int getMaxServices()
Get the maximum number of services

Returns:
The maximum number of services for the SLA to be applied for. If the value is -1, then no limit has been set

setMaxServices

public void setMaxServices(int maxServices)
Set the maximum services property

Parameters:
maxServices - The maximum services

getSlaPolicyHandler

public String getSlaPolicyHandler()
Get the SLAPolicyHandler class name to create

Returns:
The fully qualified class name of the SLAPolicyHandler to create

setSlaPolicyHandler

public void setSlaPolicyHandler(String slaPolicyHandler)
Set the SLAPolicyHandler class name to create

Parameters:
slaPolicyHandler - The fully qualified class name of the SLAPolicyHandler to create

toString

public String toString()
Overrides:
toString in class ThresholdValues

Copyright © Rio Project.

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