Package org.swisspush.gateleen.qos
Class QoSSentinel
- java.lang.Object
-
- org.swisspush.gateleen.qos.QoSSentinel
-
public class QoSSentinel extends java.lang.ObjectRepresents 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.DoublegetLowestPercentileMinValue()Returns the minimal lowest percentile value of this sentinel.doublegetLowestPercentileValue()Returns the lowest measured percentile value of this sentinel.java.lang.StringgetName()Returns the name of this sentinel.java.lang.IntegergetPercentile()Returns a percentile which is used to override the global setting for this specific metric.voidsetLowestPercentileMinValue(java.lang.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.
-
-
-
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
-
-