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 methods LimiterMBean.getInfoSummary(int[]) and LimiterMBean.getConfigSummary().

    Field Open Type Description

    limiter-name

    String

    The name of this limiter. Always null for per-node values returned by LimiterMBean.getConfigSummary().

    type

    String

    The type of this limiter. Always null for per-node values returned by LimiterMBean.getConfigSummary().

    node-id

    Integer

    The node ID that this row applies to. -1 for the cluster-wide values row returned by LimiterMBean.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 by LimiterMBean.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 Information CompositeData objects (see below).

    Tier Information

    A CompositeData object containing Tier information as returned in the tiers field of the Limiter Information CompositeData 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 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 name
        statistic - 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 effect
        limitPercentage - 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 effect
        limitPercentages - 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 remove
        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 and nodeIDs differ in length.
        com.opencloud.util.exception.ValidationException - if the new limiter configuration is invalid.
        Since:
        Rhino 2.7.0