Package io.smallrye.faulttolerance.api
Annotation Type CustomBackoff
-
@Inherited @Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) @Experimental("first attempt at providing additional retry backoff strategies") public @interface CustomBackoff
Modifies a@Retryannotation 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 givenCustomBackoffStrategyis created and used for computing delays between individual retry attempts, including before the first retry.All configuration options of
@Retrystill apply and all their constraints are still enforced. Additionally:delay,delayUnit: passed toCustomBackoffStrategy.init(long)as an initial delay. The strategy may ignore it if the concept of initial delay doesn't make sense.
- See Also:
value()
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends CustomBackoffStrategy>valueClass of the custom backoff strategy that will be used to compute retry delays.
-
-
-
Element Detail
-
value
Class<? extends CustomBackoffStrategy> value
Class of the custom backoff strategy that will be used to compute retry delays.- Returns:
- custom backoff strategy class
- See Also:
CustomBackoffStrategy
-
-