Class WingsOverloadFilter.Config

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      long getLogInterval() Logging interval in millis.
      void setLogInterval(long logInterval) Logging interval in millis.
      int getFallbackCode() http status of response when overload
      void setFallbackCode(int fallbackCode) http status of response when overload
      String getFallbackBody() body of response when overload
      void setFallbackBody(String fallbackBody) body of response when overload
      int getRequestCapacity()
      fast request capacity, note that shared IP's can be easily misjudged.
      `<0` - unlimited, max number of requests to process
      `>0` - user defined value based on stress test results
      `0` - auto-tuning, initial value is cpu cores x 300
      
      void setRequestCapacity(int requestCapacity)
      fast request capacity, note that shared IP's can be easily misjudged.
      `<0` - unlimited, max number of requests to process
      `>0` - user defined value based on stress test results
      `0` - auto-tuning, initial value is cpu cores x 300
      
      long getRequestInterval() within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip.
      void setRequestInterval(long requestInterval) within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip.
      int getRequestCalmdown() within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip.
      void setRequestCalmdown(int requestCalmdown) within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip.
      Map<String, String> getRequestPermit() request ip whitelist, match by start-with
      void setRequestPermit(Map<String, String> requestPermit) request ip whitelist, match by start-with
      long getResponseWarnSlow() slow response in millis, if exceeded, log WARN, `<0` means disable
      void setResponseWarnSlow(long responseWarnSlow) slow response in millis, if exceeded, log WARN, `<0` means disable
      long getResponseInfoStat() log INFO once for each number of requests, `<0` means disable
      void setResponseInfoStat(long responseInfoStat) log INFO once for each number of requests, `<0` means disable
      boolean equals(@Nullable() Object o)
      int hashCode()
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WingsOverloadFilter.Config

        WingsOverloadFilter.Config()
    • Method Detail

      • setLogInterval

         void setLogInterval(long logInterval)

        Logging interval in millis.

      • getFallbackCode

         int getFallbackCode()

        http status of response when overload

      • setFallbackCode

         void setFallbackCode(int fallbackCode)

        http status of response when overload

      • getRequestCapacity

         int getRequestCapacity()
        fast request capacity, note that shared IP's can be easily misjudged.
        `<0` - unlimited, max number of requests to process
        `>0` - user defined value based on stress test results
        `0` - auto-tuning, initial value is cpu cores x 300
        
      • setRequestCapacity

         void setRequestCapacity(int requestCapacity)
        fast request capacity, note that shared IP's can be easily misjudged.
        `<0` - unlimited, max number of requests to process
        `>0` - user defined value based on stress test results
        `0` - auto-tuning, initial value is cpu cores x 300
        
      • getRequestInterval

         long getRequestInterval()

        within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip. `<=0` means no limit.

      • setRequestInterval

         void setRequestInterval(long requestInterval)

        within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip. `<=0` means no limit.

      • getRequestCalmdown

         int getRequestCalmdown()

        within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip. `<=0` means no limit.

      • setRequestCalmdown

         void setRequestCalmdown(int requestCalmdown)

        within `interval` milliseconds, no more than `calmdown` requests can be processed for the same ip. `<=0` means no limit.

      • getResponseWarnSlow

         long getResponseWarnSlow()

        slow response in millis, if exceeded, log WARN, `<0` means disable

      • setResponseWarnSlow

         void setResponseWarnSlow(long responseWarnSlow)

        slow response in millis, if exceeded, log WARN, `<0` means disable

      • getResponseInfoStat

         long getResponseInfoStat()

        log INFO once for each number of requests, `<0` means disable

      • setResponseInfoStat

         void setResponseInfoStat(long responseInfoStat)

        log INFO once for each number of requests, `<0` means disable