Class AcceptRateLimit

    • Constructor Detail

      • AcceptRateLimit

        public AcceptRateLimit​(@Name("acceptRateLimit")
                               int acceptRateLimit,
                               @Name("period")
                               long period,
                               @Name("units")
                               java.util.concurrent.TimeUnit units,
                               @Name("server")
                               Server server)
      • AcceptRateLimit

        public AcceptRateLimit​(@Name("limit")
                               int limit,
                               @Name("period")
                               long period,
                               @Name("units")
                               java.util.concurrent.TimeUnit units,
                               @Name("connectors")
                               Connector... connectors)
    • Method Detail

      • getAcceptRateLimit

        @ManagedAttribute("The accept rate limit")
        public int getAcceptRateLimit()
      • getUnits

        @ManagedAttribute("The accept rate period units")
        public java.util.concurrent.TimeUnit getUnits()
      • getMaxRate

        @ManagedAttribute("The maximum accept rate achieved")
        public long getMaxRate()
      • age

        protected void age​(long period,
                           java.util.concurrent.TimeUnit units)
      • doStart

        protected void doStart()
                        throws java.lang.Exception
        Description copied from class: AbstractLifeCycle
        Method to override to start the lifecycle
        Overrides:
        doStart in class AbstractLifeCycle
        Throws:
        AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
        java.lang.Exception - If there was a problem starting. Will cause a transition to FAILED state
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Description copied from class: AbstractLifeCycle
        Method to override to stop the lifecycle
        Overrides:
        doStop in class AbstractLifeCycle
        Throws:
        java.lang.Exception - If there was a problem stopping. Will cause a transition to FAILED state
      • limit

        protected void limit()
      • unlimit

        protected void unlimit()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable