Annotation Interface RateLimited


@Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface RateLimited
An annotation indicating that access to this REST resource should be rate limited. Rate limiting applies per node and per user. Anonymous users are rate limited separately.
Since:
9.3.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Type of the requests that have to be rate limited
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    double
    Permits per second.
    System property custom name, which is used to override the rate limit value.
    Identifies which requests should be rate limited
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Prefix for the default name of the system property, that may be used to override the rate limit value.
  • Field Details

    • PROPERTY_NAME_PREFIX

      static final String PROPERTY_NAME_PREFIX
      Prefix for the default name of the system property, that may be used to override the rate limit value. Default name format is
      PROPERTY_NAME_PREFIX + "." + classNameLowerCase + "." + methodNameLowerCase
      See Also:
  • Element Details

    • propertyName

      String propertyName
      System property custom name, which is used to override the rate limit value. If not specified, default property name is used (pls see PROPERTY_NAME_PREFIX for more details)
      Returns:
      system property custom name, which is used to override the rate limit.
      Default:
      ""
    • permitsPerSecond

      double permitsPerSecond
      Permits per second. Any value <= 0 is treated as "no limits"
      Returns:
      permits per second
      Default:
      0.0
    • type

      Identifies which requests should be rate limited
      Returns:
      type of the requests which have to be rate limited
      Default:
      ALL