An open API service indexing awesome lists of open source software.

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.

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();
```