Annotation Interface Retry


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Retry
Declares bounded retry metadata for a service method.

Retries are attempted only when runtime policy allows them and the method is safe to retry. Non-idempotent methods must not be automatically retried simply because this annotation is present.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Returns the maximum retry attempts.
    Returns the exact trusted-host retry policy name.
  • Element Details

    • maxAttempts

      int maxAttempts
      Returns the maximum retry attempts.
      Returns:
      maximum attempts after the initial call
      Default:
      0
    • policy

      String policy
      Returns the exact trusted-host retry policy name. The annotation never installs a policy.
      Returns:
      policy identifier; default selects the host's explicitly registered default profile
      Default:
      "default"