Package com.tnsai.resilience
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.
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
-
Method Details
-
invoke
- Throws:
Exception
-