Interface FallbackResolver.RetryCallback

Enclosing class:
FallbackResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface FallbackResolver.RetryCallback
Callback for re-invoking the primary action during retry. FallbackResolver.tryRecover(com.tnsai.metadata.ActionMetadata, com.tnsai.roles.Role, java.util.Map<java.lang.String, java.lang.Object>, java.lang.Throwable, com.tnsai.resilience.FallbackResolver.RetryCallback) calls this up to Fallback.maxRetries() times before giving up and invoking the fallback method.

Throws Exception (not Throwable) so callers can narrow their catch — JVM-fatal Errors should propagate up, not be swept into the retry loop.

  • Method Summary

    Modifier and Type
    Method
    Description