https://github.com/jloisel/retrying-callable
Wrap any Callable<T> to retry it on failure with configurable retry and wait policies.
https://github.com/jloisel/retrying-callable
Last synced: 10 months ago
JSON representation
Wrap any Callable<T> to retry it on failure with configurable retry and wait policies.
- Host: GitHub
- URL: https://github.com/jloisel/retrying-callable
- Owner: jloisel
- Created: 2013-01-13T09:15:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-15T20:58:22.000Z (over 13 years ago)
- Last Synced: 2025-02-16T21:16:34.860Z (about 1 year ago)
- Language: Java
- Size: 152 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
retrying-callable
=================
Wrap any Callable to retry it with configurable retry and wait policies.
Usage:
```java
import static com.jloisel.concurrent.retry.RetryPolicies.*;
import static com.jloisel.concurrent.backoff.BackOffPolicies.*;
final Callable callable = ...;
final RetryOnFailureCallableBuilder b = new RetryOnFailureCallableBuilder<>(callable);
final Callable retrying = b
.retry(attempts(3))
.backoff(sleep(5, TimeUnit.SECONDS))
.build();
```