Class AbstractPolicy

java.lang.Object
org.openspaces.pu.sla.AbstractPolicy
All Implemented Interfaces:
Serializable, Policy
Direct Known Subclasses:
RelocationPolicy, ScaleUpPolicy

public abstract class AbstractPolicy extends Object implements Policy
Simple base class for different policies.
Author:
kimchy
See Also:
  • Constructor Details

    • AbstractPolicy

      public AbstractPolicy()
  • Method Details

    • getHigh

      public double getHigh()
      Description copied from interface: Policy
      The high threshold value of the policy.
      Specified by:
      getHigh in interface Policy
      See Also:
    • setHigh

      public void setHigh(double high)
      Description copied from interface: Policy
      The high threshold value of the policy.
      Specified by:
      setHigh in interface Policy
      See Also:
    • getLow

      public double getLow()
      Description copied from interface: Policy
      The low threshold value of the policy.
      Specified by:
      getLow in interface Policy
      See Also:
    • setLow

      public void setLow(double low)
      Description copied from interface: Policy
      The low threshold value of the policy.
      Specified by:
      setLow in interface Policy
      See Also:
    • getMonitor

      public String getMonitor()
      Description copied from interface: Policy
      The monitor name this policy will use in order to get check if its value has breached the policy thresholds (Policy.setHigh(double) and Policy.setLow(double)).
      Specified by:
      getMonitor in interface Policy
      See Also:
    • setMonitor

      public void setMonitor(String monitor)
      Description copied from interface: Policy
      The monitor name this policy will use in order to get check if its value has breached the policy thresholds (Policy.setHigh(double) and Policy.setLow(double)).
      Specified by:
      setMonitor in interface Policy
      See Also:
    • getLowerDampener

      public long getLowerDampener()
      Returns the lower dampener for this policy. If the lower
      Specified by:
      getLowerDampener in interface Policy
    • setLowerDampener

      public void setLowerDampener(long lowerDampener)
      Sets the lower dampener for this policy.
      Specified by:
      setLowerDampener in interface Policy
    • getUpperDampener

      public long getUpperDampener()
      Returns the lower dampener for this policy.
      Specified by:
      getUpperDampener in interface Policy
    • setUpperDampener

      public void setUpperDampener(long upperDampener)
      Description copied from interface: Policy
      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. Set in milliseconds, defaults to 3000.
      Specified by:
      setUpperDampener in interface Policy