Class ConfigureRateLimiterTask

  • All Implemented Interfaces:
    SubTask

    public class ConfigureRateLimiterTask
    extends AbstractBaseTask

    A Rhino management sub task for configuring a rate limiter.

    Ant Parameters
    Attribute Description Required

    failonerror

    Flag to control failure behaviour. If 'true', the sub task will throw a BuildException when an error is encountered. If 'false', the sub task will throw a NonFatalBuildException instead of a BuildException under specific circumstances. See below for conditions (if any) which will cause a NonFatalBuildException.

    No. default value is taken from the Rhino management parent task.

    name

    The name of the rate limiter to be configured.

    Yes.

    maxrate

    The maximum rate of tokens per second the rate limiter will allow. A value of '-' may be used to clear existing per-node settings when a list of nodes is specified.

    No.

    bypassed

    Whether this rate limiter will be used or bypassed for limiting rate. If false the limiter will be used (not bypassed), if true the limiter will be bypassed and hence not be used. A value of '-' may be used to clear existing per-node settings when a list of nodes is specified.

    No.

    timeunit

    The rate limiter will allow maxrate tokens per timeunit. Allowed values are SECONDS, MINUTES, HOURS, DAYS.

    No.

    depth

    Controls the amount of "burstiness" allowed by the rate limiter. A value of '-' may be used to clear existing per-node settings when a list of nodes is specified.

    No.

    parent

    Sets the parent of the limiter, adding the limiter to its parent’s limiter hierarchy.

    No.

    nodes

    Comma-delimited list of nodes to apply this configuration to. Only the maxrate, bypassed, and depth configuration properties may be set on a per-node basis, all other properties are set uniformly across all nodes.

    No.

    • Constructor Detail

      • ConfigureRateLimiterTask

        public ConfigureRateLimiterTask()
    • Method Detail

      • execute

        protected void execute()
                        throws org.apache.tools.ant.BuildException
        Specified by:
        execute in class AbstractBaseTask
        Throws:
        org.apache.tools.ant.BuildException
      • validateParameters

        protected void validateParameters()
                                   throws org.apache.tools.ant.BuildException
        Specified by:
        validateParameters in class AbstractBaseTask
        Throws:
        org.apache.tools.ant.BuildException
      • setName

        public void setName​(String name)
      • setMaxRate

        public void setMaxRate​(String maxRate)
      • setBypassed

        public void setBypassed​(String bypassed)
      • setDepth

        public void setDepth​(String depth)
      • setTimeUnit

        public void setTimeUnit​(String timeUnit)
      • setParent

        public void setParent​(String parent)
      • setNodes

        public void setNodes​(String nodes)