Package org.swisspush.gateleen.qos
Class QoSSentinel
- java.lang.Object
-
- org.swisspush.gateleen.qos.QoSSentinel
-
public class QoSSentinel extends 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(String name)Creates a new sentinel with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoublegetLowestPercentileMinValue()Returns the minimal lowest percentile value of this sentinel.doublegetLowestPercentileValue()Returns the lowest measured percentile value of this sentinel.StringgetName()Returns the name of this sentinel.IntegergetPercentile()Returns a percentile which is used to override the global setting for this specific metric.voidsetLowestPercentileMinValue(Double lowestPercentileMinValue)Sets the minimal lowest percentile value of this sentinel.voidsetLowestPercentileValue(double lowestPercentileValue)Sets the lowest measured percentile value of this sentinel.voidsetPercentile(int percentile)Sets the percentile to override the global setting.
-
-
-
Constructor Detail
-
QoSSentinel
public QoSSentinel(String name)
Creates a new sentinel with the given name.- Parameters:
name- the name of this sentinel (metric).
-
-
Method Detail
-
getPercentile
public 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 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 Double getLowestPercentileMinValue()
Returns the minimal lowest percentile value of this sentinel.- Returns:
- minimal lowest percentile value
-
setLowestPercentileMinValue
public void setLowestPercentileMinValue(Double lowestPercentileMinValue)
Sets the minimal lowest percentile value of this sentinel.- Parameters:
lowestPercentileMinValue- minimal lowest percentile value
-
-