Class QoSSentinel


  • public class QoSSentinel
    extends java.lang.Object
    Represents a sentinel of the QoS. A sentinel is normaly a metric which is used to calculate if a request has to be rejected or not.
    The sentinel names are used / set in the routing rules.
    Author:
    https://github.com/ljucam [Mario Ljuca]
    • Constructor Summary

      Constructors 
      Constructor Description
      QoSSentinel​(java.lang.String name)
      Creates a new sentinel with the given name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double getLowestPercentileMinValue()
      Returns the minimal lowest percentile value of this sentinel.
      double getLowestPercentileValue()
      Returns the lowest measured percentile value of this sentinel.
      java.lang.String getName()
      Returns the name of this sentinel.
      java.lang.Integer getPercentile()
      Returns a percentile which is used to override the global setting for this specific metric.
      void setLowestPercentileMinValue​(java.lang.Double lowestPercentileMinValue)
      Sets the minimal lowest percentile value of this sentinel.
      void setLowestPercentileValue​(double lowestPercentileValue)
      Sets the lowest measured percentile value of this sentinel.
      void setPercentile​(int percentile)
      Sets the percentile to override the global setting.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QoSSentinel

        public QoSSentinel​(java.lang.String name)
        Creates a new sentinel with the given name.
        Parameters:
        name - the name of this sentinel (metric).
    • Method Detail

      • getPercentile

        public java.lang.Integer getPercentile()
        Returns a percentile which is used to override the global setting for this specific metric.
        If no override is set, null will be returned.
        Returns:
        if set the override percentile, otherwise null
      • setPercentile

        public void setPercentile​(int percentile)
        Sets the percentile to override the global setting.
        Parameters:
        percentile -
      • getName

        public java.lang.String getName()
        Returns the name of this sentinel.
        Returns:
        name of the sentinel (metric).
      • getLowestPercentileValue

        public double getLowestPercentileValue()
        Returns the lowest measured percentile value of this sentinel.
        Returns:
        lowest measured percentile value
      • setLowestPercentileValue

        public void setLowestPercentileValue​(double lowestPercentileValue)
        Sets the lowest measured percentile value of this sentinel.
        Parameters:
        lowestPercentileValue - lowest measured percentile value
      • getLowestPercentileMinValue

        public java.lang.Double getLowestPercentileMinValue()
        Returns the minimal lowest percentile value of this sentinel.
        Returns:
        minimal lowest percentile value
      • setLowestPercentileMinValue

        public void setLowestPercentileMinValue​(java.lang.Double lowestPercentileMinValue)
        Sets the minimal lowest percentile value of this sentinel.
        Parameters:
        lowestPercentileMinValue - minimal lowest percentile value