Package org.openspaces.pu.sla
Class AbstractPolicy
java.lang.Object
org.openspaces.pu.sla.AbstractPolicy
- All Implemented Interfaces:
Serializable,Policy
- Direct Known Subclasses:
RelocationPolicy,ScaleUpPolicy
Simple base class for different policies.
- Author:
- kimchy
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetHigh()The high threshold value of the policy.doublegetLow()The low threshold value of the policy.longReturns the lower dampener for this policy.The monitor name this policy will use in order to get check if its value has breached the policy thresholds (Policy.setHigh(double)andPolicy.setLow(double)).longReturns the lower dampener for this policy.voidsetHigh(double high) The high threshold value of the policy.voidsetLow(double low) The low threshold value of the policy.voidsetLowerDampener(long lowerDampener) Sets the lower dampener for this policy.voidsetMonitor(String monitor) The monitor name this policy will use in order to get check if its value has breached the policy thresholds (Policy.setHigh(double)andPolicy.setLow(double)).voidsetUpperDampener(long upperDampener) The upper dampener acts as a time window where if the upper threshold has been cleared (after it has been breached), it won't cause the policy action to happen.
-
Constructor Details
-
AbstractPolicy
public AbstractPolicy()
-
-
Method Details
-
getHigh
public double getHigh()Description copied from interface:PolicyThe high threshold value of the policy. -
setHigh
public void setHigh(double high) Description copied from interface:PolicyThe high threshold value of the policy. -
getLow
public double getLow()Description copied from interface:PolicyThe low threshold value of the policy. -
setLow
public void setLow(double low) Description copied from interface:PolicyThe low threshold value of the policy. -
getMonitor
Description copied from interface:PolicyThe monitor name this policy will use in order to get check if its value has breached the policy thresholds (Policy.setHigh(double)andPolicy.setLow(double)).- Specified by:
getMonitorin interfacePolicy- See Also:
-
setMonitor
Description copied from interface:PolicyThe monitor name this policy will use in order to get check if its value has breached the policy thresholds (Policy.setHigh(double)andPolicy.setLow(double)).- Specified by:
setMonitorin interfacePolicy- See Also:
-
getLowerDampener
public long getLowerDampener()Returns the lower dampener for this policy. If the lower- Specified by:
getLowerDampenerin interfacePolicy
-
setLowerDampener
public void setLowerDampener(long lowerDampener) Sets the lower dampener for this policy.- Specified by:
setLowerDampenerin interfacePolicy
-
getUpperDampener
public long getUpperDampener()Returns the lower dampener for this policy.- Specified by:
getUpperDampenerin interfacePolicy
-
setUpperDampener
public void setUpperDampener(long upperDampener) Description copied from interface:PolicyThe upper dampener acts as a time window where if the upper threshold has been cleared (after it has been breached), it won't cause the policy action to happen. Set in milliseconds, defaults to3000.- Specified by:
setUpperDampenerin interfacePolicy
-