Interface RelativeStatLimiterMBean
-
- All Superinterfaces:
LimiterMBean
,StatLimiterMBean
public interface RelativeStatLimiterMBean extends StatLimiterMBean
Defines the JMX interface for controlling a single relative stat limiter.
Limiter Information
A
CompositeData
object containing detailed Limiter information for specified nodes is returned by the methodsLimiterMBean.getInfoSummary(int[])
andLimiterMBean.getConfigSummary()
.Field Open Type Description limiter-name
String
The name of this limiter. Always
null
for per-node values returned byLimiterMBean.getConfigSummary()
.type
String
The type of this limiter. Always
null
for per-node values returned byLimiterMBean.getConfigSummary()
.node-id
Integer
The node ID that this row applies to.
-1
for the cluster-wide values row returned byLimiterMBean.getConfigSummary()
.parent
String
The name of the parent of this limiter or null if it has no parent. Always
null
for per-node values returned byLimiterMBean.getConfigSummary()
.parameter-set
String
The parameter set for the statistic to monitor.
statistic
String
The statistic to monitor.
relative-parameter-set
String
The parameter set for the statistic to compare against.
relative-statistic
String
The statistic to compare against.
bypassed
Boolean
The bypassed setting for this limiter.
tiers
TabularData
The rate limit percentage tiers, as a
TabularData
of Tier InformationCompositeData
objects (see below).Tier Information
A
CompositeData
object containing Tier information as returned in thetiers
field of the Limiter InformationCompositeData
object (see above).Field Open Type Description relative-percentage
Double
The relative percentage defining this tier. Between 0 and 100 inclusive.
limit-percentage
Double
The percentage of calls to limit when this tier is active. Between 0 and 100 inclusive.
- Since:
- Rhino 2.7.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearTier(double relativePercentage)
Clear (remove) the given tier if it exists.void
clearTierForNode(double[] relativePercentages, int[] nodeIDs)
Clear (remove) the given per-node tiers if they exist.String
getRelativeParameterSet()
Get the parameter set for the statistic to compare against.String
getRelativeStatistic()
Get the statistic to compare against.double[]
getTierPercentages()
Get the relative percentages representing the limiting tiers.double[][]
getTierPercentagesForNodes(int[] nodeIDs)
Get the per-node relative percentages representing the limiting tiers.void
setRelativeParameterSetStatistic(String parameterSet, String statistic)
Set the parameter set and statistic to compare against.void
setTier(double relativePercentage, double limitPercentage)
Create or update the given relative percentage tier with the specified limit percentage.void
setTierForNode(double[] relativePercentages, double[] limitPercentages, int[] nodeIDs)
Create or update the given per-node relative percentage tiers with the specified limit percentages.-
Methods inherited from interface com.opencloud.rhino.limiting.LimiterMBean
getChildLimiters, getConfigSummary, getConnectedEndPoints, getInfoSummary, getName, getParent, getType, isBypassedDefault, isBypassedForNode, setBypassedDefault, setBypassedForNode, setBypassedForNode, setParent, useDefaultConfig
-
Methods inherited from interface com.opencloud.rhino.limiting.StatLimiterMBean
getLimitPercentages, getLimitPercentagesForNodes, getParameterSet, getStatistic, setParameterSetStatistic
-
-
-
-
Method Detail
-
getRelativeParameterSet
String getRelativeParameterSet() throws ConfigurationException
Get the parameter set for the statistic to compare against.
- Returns:
- the parameter set name containing the statistic to compare against
- Throws:
ConfigurationException
- if an error occurred reading the limiter configuration.- Since:
- Rhino 2.7.0
-
getRelativeStatistic
String getRelativeStatistic() throws ConfigurationException
Get the statistic to compare against.
- Returns:
- the statistic name to compare against
- Throws:
ConfigurationException
- if an error occurred reading the limiter configuration.- Since:
- Rhino 2.7.0
-
getTierPercentages
double[] getTierPercentages() throws ConfigurationException
Get the relative percentages representing the limiting tiers.
- Returns:
- an array of the relative percentages or an empty array if not configured
- Throws:
ConfigurationException
- if an error occurred reading the limiter configuration.- Since:
- Rhino 2.7.0
-
getTierPercentagesForNodes
double[][] getTierPercentagesForNodes(int[] nodeIDs) throws ConfigurationException, InvalidArgumentException
Get the per-node relative percentages representing the limiting tiers.
- Parameters:
nodeIDs
- the IDs of the nodes- Returns:
- a two-dimensional array of the relative percentages for each node or an empty array if not configured
- Throws:
ConfigurationException
- if an error occurred reading the limiter configuration.InvalidArgumentException
- if nodeIDs is a zero-length array.- Since:
- Rhino 2.7.0
-
setRelativeParameterSetStatistic
void setRelativeParameterSetStatistic(String parameterSet, String statistic) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Set the parameter set and statistic to compare against.
- Parameters:
parameterSet
- the parameter set namestatistic
- the statistic name- Throws:
ConfigurationException
- if an error occurred updating the limiter configuration.com.opencloud.util.exception.ValidationException
- if the new limiter configuration is invalid.- Since:
- Rhino 2.7.0
-
setTier
void setTier(double relativePercentage, double limitPercentage) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Create or update the given relative percentage tier with the specified limit percentage.
- Parameters:
relativePercentage
- the percentage of the relative statistic value at which this limiter tier will begin to be in effectlimitPercentage
- the corresponding percentage of requested units to reject while this tier is in effect (0 to 100 inclusive)- Throws:
ConfigurationException
- if an error occurred updating the limiter configuration.com.opencloud.util.exception.ValidationException
- if the new limiter configuration is invalid.- Since:
- Rhino 2.7.0
-
setTierForNode
void setTierForNode(double[] relativePercentages, double[] limitPercentages, int[] nodeIDs) throws ConfigurationException, InvalidArgumentException, com.opencloud.util.exception.ValidationException
Create or update the given per-node relative percentage tiers with the specified limit percentages.
- Parameters:
relativePercentages
- the percentages of the relative statistic value at which point each limiter tier will begin to be in effectlimitPercentages
- the percentages of requested units to reject while each tier is in effect (0 to 100 inclusive)nodeIDs
- the IDs of the nodes- Throws:
ConfigurationException
- if an error occurred updating the limiter configuration.InvalidArgumentException
- if nodeIDs is a zero-length array, or if relativePercentages, limitPercentages, and nodeIDs differ in length.com.opencloud.util.exception.ValidationException
- if the new limiter configuration is invalid.- Since:
- Rhino 2.7.0
-
clearTier
void clearTier(double relativePercentage) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Clear (remove) the given tier if it exists.
- Parameters:
relativePercentage
- the percentage corresponding to the tier to remove- Throws:
ConfigurationException
- if an error occurred updating the limiter configuration.com.opencloud.util.exception.ValidationException
- if the new limiter configuration is invalid.- Since:
- Rhino 2.7.0
-
clearTierForNode
void clearTierForNode(double[] relativePercentages, int[] nodeIDs) throws ConfigurationException, InvalidArgumentException, com.opencloud.util.exception.ValidationException
Clear (remove) the given per-node tiers if they exist.
- Parameters:
relativePercentages
- the percentages corresponding to the tiers to removenodeIDs
- the IDs of the nodes- Throws:
ConfigurationException
- if an error occurred updating the limiter configuration.InvalidArgumentException
- if nodeIDs is a zero-length array, or if relativePercentages and nodeIDs differ in length.com.opencloud.util.exception.ValidationException
- if the new limiter configuration is invalid.- Since:
- Rhino 2.7.0
-
-