Annotation Interface RequiresPolicy


@ExperimentalJSentinelApi @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface RequiresPolicy
Requires the named Policy (registered with the resolved PolicyRegistry) to Allow the current request.

A single annotation carries a single policy name. Combining algorithms (any-of / all-of) will be added later via a separate annotation to keep this contract stable.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the policy registered with the PolicyRegistry.
  • Element Details

    • value

      String value
      Name of the policy registered with the PolicyRegistry.
      Returns:
      policy name