Failsafe is a Java 8+ library for handling failures. The library is super simple, lightweight and works without additional dependencies. Failsafe wraps executable code with single or multiple policies, which can be combined as needed.
Failsafe policies determining which execution results or failures to handle.
- Failsafe Retry Policy - when retries should be performed for an executionm
- Failsafe Timeout Policy - failing an execution if it takes too long to completem
- Failsafe Fallback Policy - providing an alternative result for a failed execution,
- Failsafe Circuit Breaker Policy - creating systems that fail fast by temporarily disabling execution as a way of preventing system overload.