Interface RateLimiterMBean
-
- All Superinterfaces:
LimiterMBean
public interface RateLimiterMBean extends LimiterMBean
Defines the JMX interface for controlling a single rate 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()
.maxrate
Double
The maximum rate setting for this limiter
time-unit
String
The time unit setting for this limiter. Always
null
for per-node values returned byLimiterMBean.getConfigSummary()
.bypassed
Boolean
The bypassed setting for this limiter
depth
Double
The depth setting for this limiter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getDepthDefault()
Get the default "depth" of this limiter (depth is the number of time units' worth of work capacity can be stored by the rate limiter).double[]
getDepthForNode(int[] nodeIDs)
Get the per-node "depth" of this limiter on the specified nodes (depth is the number of time units' worth of work capacity can be stored by the rate limiter).double
getMaxRateDefault()
Get the default maximum number of units which can be consumed per time unit by this limiter, eg "100" for a rate of 100 per second.double[]
getMaxRateForNode(int[] nodeIDs)
Get the per-node maximum number of units which can be consumed per time unit by this limiter on the specified nodes, eg "100" for a rate of 100 per second.String
getTimeUnit()
Get the type of time unit to be used by this limiter when setting the rate, eg the "seconds" in a rate of 100 per second.void
setDepthDefault(double depth)
Set the default "depth" of this limiter (depth is the number of time units' worth of work capacity can be stored by the rate limiter).void
setDepthForNode(double[] depth, int[] nodeIDs)
Set the per-node "depth" of this limiter on the specified nodes (depth is the number of time units' worth of work capacity can be stored by the rate limiter).void
setDepthForNode(Double[] depth, int[] nodeIDs)
Set the per-node "depth" of this limiter on the specified nodes.void
setMaxRateDefault(double maxRate)
Set the default maximum number of units which can be consumed per time unit by this limiter, eg "100" for a rate of 100 per second.void
setMaxRateForNode(double[] maxRate, int[] nodeIDs)
Set the per-node maximum number of units which can be consumed per time unit by this limiter on the specified nodes, eg "100" for a rate of 100 per second.void
setMaxRateForNode(Double[] maxRate, int[] nodeIDs)
Set the per-node maximum number of units which can be consumed per time unit by this limiter on the specified nodes, eg "100" for a rate of 100 per second.void
setTimeUnit(String timeUnit)
Set the type of time unit to be used by this limiter when setting the rate, eg the "seconds" in a rate of 100 per second.-
Methods inherited from interface com.opencloud.rhino.limiting.LimiterMBean
getChildLimiters, getConfigSummary, getConnectedEndPoints, getInfoSummary, getName, getParent, getType, isBypassedDefault, isBypassedForNode, setBypassedDefault, setBypassedForNode, setBypassedForNode, setParent, useDefaultConfig
-
-
-
-
Method Detail
-
getMaxRateDefault
double getMaxRateDefault() throws ConfigurationException
Get the default maximum number of units which can be consumed per time unit by this limiter, eg "100" for a rate of 100 per second. This value will be used when no per-node setting exists for a given node.
- Throws:
ConfigurationException
-
getMaxRateForNode
double[] getMaxRateForNode(int[] nodeIDs) throws ConfigurationException, NullPointerException, InvalidArgumentException
Get the per-node maximum number of units which can be consumed per time unit by this limiter on the specified nodes, eg "100" for a rate of 100 per second.
-
setMaxRateDefault
void setMaxRateDefault(double maxRate) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Set the default maximum number of units which can be consumed per time unit by this limiter, eg "100" for a rate of 100 per second. This value will be used when no per-node setting exists for a given node.
- Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
-
setMaxRateForNode
void setMaxRateForNode(double[] maxRate, int[] nodeIDs) throws ConfigurationException, NullPointerException, InvalidArgumentException, com.opencloud.util.exception.ValidationException
Set the per-node maximum number of units which can be consumed per time unit by this limiter on the specified nodes, eg "100" for a rate of 100 per second.
- Throws:
ConfigurationException
NullPointerException
InvalidArgumentException
com.opencloud.util.exception.ValidationException
-
setMaxRateForNode
void setMaxRateForNode(Double[] maxRate, int[] nodeIDs) throws ConfigurationException, NullPointerException, InvalidArgumentException, com.opencloud.util.exception.ValidationException
Set the per-node maximum number of units which can be consumed per time unit by this limiter on the specified nodes, eg "100" for a rate of 100 per second.
This method is identical to
setMaxRateForNode(double[], int[])
but it allows a previously set per-node value to be deleted by specifying a null value for that node in the input array.- Throws:
ConfigurationException
NullPointerException
InvalidArgumentException
com.opencloud.util.exception.ValidationException
- Since:
- Rhino 2.7.0
-
getTimeUnit
String getTimeUnit() throws ConfigurationException
Get the type of time unit to be used by this limiter when setting the rate, eg the "seconds" in a rate of 100 per second. Valid values are SECONDS, MINUTES, HOURS, and DAYS.
- Throws:
ConfigurationException
-
setTimeUnit
void setTimeUnit(String timeUnit) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Set the type of time unit to be used by this limiter when setting the rate, eg the "seconds" in a rate of 100 per second. Valid values are "SECONDS", "MINUTES", "HOURS", and "DAYS".
- Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
-
getDepthDefault
double getDepthDefault() throws ConfigurationException
Get the default "depth" of this limiter (depth is the number of time units' worth of work capacity can be stored by the rate limiter). This value will be used when no per-node setting exists for a given node. "Depth" is used to control the amount of burstiness allowed by the rate limiter. High values mean more tolerance of load bursts. Low values result in tighter, more fine grained rate limiting, and less tolerance of load bursts. "1.0" is the default value, and should be adequate for most applications. E.g. for a setting of "200 per second" at depth "1.0", the rate limiter can store up to 200 work units of capacity (1 seconds' worth), which may be used all at once in a load spike. A setting of "2.0" would mean that up to 400 work units could be stored, and a setting of "0.5" means that up to 100 units will be stored.
- Throws:
ConfigurationException
-
getDepthForNode
double[] getDepthForNode(int[] nodeIDs) throws ConfigurationException, NullPointerException, InvalidArgumentException
Get the per-node "depth" of this limiter on the specified nodes (depth is the number of time units' worth of work capacity can be stored by the rate limiter). "Depth" is used to control the amount of burstiness allowed by the rate limiter. High values mean more tolerance of load bursts. Low values result in tighter, more fine grained rate limiting, and less tolerance of load bursts. "1.0" is the default value, and should be adequate for most applications. E.g. for a setting of "200 per second" at depth "1.0", the rate limiter can store up to 200 work units of capacity (1 seconds' worth), which may be used all at once in a load spike. A setting of "2.0" would mean that up to 400 work units could be stored, and a setting of "0.5" means that up to 100 units will be stored.
-
setDepthDefault
void setDepthDefault(double depth) throws ConfigurationException, com.opencloud.util.exception.ValidationException
Set the default "depth" of this limiter (depth is the number of time units' worth of work capacity can be stored by the rate limiter). This value will be used when no per-node setting exists for a given node. "Depth" is used to control the amount of burstiness allowed by the rate limiter. High values mean more tolerance of load bursts. Low values result in tighter, more fine grained rate limiting, and less tolerance of load bursts. "1.0" is the default value, and should be adequate for most applications. E.g. for a setting of "200 per second" at depth "1.0", the rate limiter can store up to 200 work units of capacity (1 seconds' worth), which may be used all at once in a load spike. A setting of "2.0" would mean that up to 400 work units could be stored, and a setting of "0.5" means that up to 100 units will be stored.
- Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
-
setDepthForNode
void setDepthForNode(double[] depth, int[] nodeIDs) throws ConfigurationException, com.opencloud.util.exception.ValidationException, NullPointerException, InvalidArgumentException
Set the per-node "depth" of this limiter on the specified nodes (depth is the number of time units' worth of work capacity can be stored by the rate limiter). "Depth" is used to control the amount of burstiness allowed by the rate limiter. High values mean more tolerance of load bursts. Low values result in tighter, more fine grained rate limiting, and less tolerance of load bursts. "1.0" is the default value, and should be adequate for most applications. E.g. for a setting of "200 per second" at depth "1.0", the rate limiter can store up to 200 work units of capacity (1 seconds' worth), which may be used all at once in a load spike. A setting of "2.0" would mean that up to 400 work units could be stored, and a setting of "0.5" means that up to 100 units will be stored.
- Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
NullPointerException
InvalidArgumentException
-
setDepthForNode
void setDepthForNode(Double[] depth, int[] nodeIDs) throws ConfigurationException, com.opencloud.util.exception.ValidationException, NullPointerException, InvalidArgumentException
Set the per-node "depth" of this limiter on the specified nodes.
This method is identical to
setDepthForNode(double[], int[])
but it allows a previously set per-node value to be deleted by specifying a null value for that node in the input array.- Throws:
ConfigurationException
com.opencloud.util.exception.ValidationException
NullPointerException
InvalidArgumentException
- Since:
- Rhino 2.7.0
-
-