Annotation Interface RateLimiting


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Inherited public @interface RateLimiting
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The cache key which is mayby modified the e.g. the method name ratePerMethod()
    An optional execute condition which overrides the execute condition from the property file
    An optional fall back method which is executed when the rate limit occurs instead of throwing the RateLimitException.
    boolean
    The Name of the annotated method will be added to the cache key.
    An optional execute condition which overrides the execute condition from the property file
  • Element Details

    • name

      String name
      Returns:
      The name of the rate limit configuration as a reference to the property file
    • cacheKey

      String cacheKey
      The cache key which is mayby modified the e.g. the method name ratePerMethod()
      Returns:
      the cache key.
      Default:
      ""
    • executeCondition

      String executeCondition
      An optional execute condition which overrides the execute condition from the property file
      Returns:
      the expression in the Spring Expression Language format.
      Default:
      ""
    • skipCondition

      String skipCondition
      An optional execute condition which overrides the execute condition from the property file
      Returns:
      the expression in the Spring Expression Language format.
      Default:
      ""
    • ratePerMethod

      boolean ratePerMethod
      The Name of the annotated method will be added to the cache key. It's maybe a problem
      Returns:
      true if the method name should be added to the cache key.
      Default:
      false
    • fallbackMethodName

      String fallbackMethodName
      An optional fall back method which is executed when the rate limit occurs instead of throwing the RateLimitException.

      The arguments and the return type of the fallback method must have the same signature.

      Returns:
      the name of the public method which resists in the same class.
      Default:
      ""