Skip to content

Wrap any Callable<T> to retry it on failure with configurable retry and wait policies.

Notifications You must be signed in to change notification settings

jloisel/retrying-callable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

retrying-callable

Wrap any Callable to retry it with configurable retry and wait policies.

Usage:

		import static com.jloisel.concurrent.retry.RetryPolicies.*;
		import static com.jloisel.concurrent.backoff.BackOffPolicies.*;
		
		final Callable<T> callable = ...;
		final RetryOnFailureCallableBuilder<T> b = new RetryOnFailureCallableBuilder<>(callable);
		
		final Callable<T> retrying = b
			.retry(attempts(3))
			.backoff(sleep(5, TimeUnit.SECONDS))
			.build();

About

Wrap any Callable<T> to retry it on failure with configurable retry and wait policies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages