Annotation Type CustomBackoff


@Inherited @Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) @Experimental("first attempt at providing additional retry backoff strategies") public @interface CustomBackoff
Modifies a @Retry annotation to use a custom backoff strategy instead of the default constant backoff. May only be present on elements that are also annotated @Retry.

For each invocation of a method annotated @Retry, an instance of given CustomBackoffStrategy is created and used for computing delays between individual retry attempts, including before the first retry.

All configuration options of @Retry still apply and all their constraints are still enforced. Additionally:

  • delay, delayUnit: passed to CustomBackoffStrategy.init(long) as an initial delay. The strategy may ignore it if the concept of initial delay doesn't make sense.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class of the custom backoff strategy that will be used to compute retry delays.