- Enclosing class:
Ft
The annotated method will fallback to the defined method on failure.
The fallback method must have the same signature (types and number of parameters), or have one additional parameter of
type Throwable
to receive the last exception thrown.
Fault tolerance will add all intermediate exceptions as Throwable.addSuppressed(Throwable)
.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueName of the method to fallback to. The method must follow the signature rules defined on this class.- Returns:
- method name on the same instance (can also be a static method)
-
applyOn
List of exception types that this fallback should be executed on.- Returns:
- throwables that trigger fallback
- Default:
{java.lang.Throwable.class}
-
skipOn
List of exceptions that will not execute a fallback. For these exceptions, the throwable will be propagated to the caller.- Returns:
- throwables that are re-thrown
- Default:
{}
-