What is this?
The retry module provides a general purpose method for retrying arbitrary Java code with specific stop, retry, and exception handling capabilities that are enhanced by Guava's predicate matching.
This is a fork of the guava-retrying library by Ryan Holder (rholder), which is itself a fork of the RetryerBuilder by Jean-Baptiste Nizet (JB). The retry project added a Gradle build for pushing it up to Maven Central, and exponential and Fibonacci backoff WaitStrategies that might be useful for situations where more well-behaved service polling is preferred.
Reasons for Fork
- Add Java 11 support
- Use java.util.Predicate and java.util.Function instead of Guava equivalents
- Make compatible with latest versions of Guava (27+)
- Fix all errorprone warnings in original source code
Installation
The library is available on Maven Central.
Maven
Add the following to your pom.xml
:
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
...
<dependency>
<groupId>com.arakelian</groupId>
<artifactId>retry</artifactId>
<version>3.9.0</version>
<scope>test</scope>
</dependency>
Gradle
Add the following to your build.gradle
:
repositories {
mavenCentral()
}
dependencies {
testCompile 'com.arakelian:retry:3.9.0'
}
Licence
Apache Version 2.0
Documentation
Javadoc can be found here.
License
The retry module is released under version 2.0 of the Apache License.
Contributors
- Jean-Baptiste Nizet (JB)
- Jason Dunkelberger (dirkraft)
- Diwaker Gupta (diwakergupta)
- Jochen Schalanda (joschi)
- Shajahan Palayil (shasts)
- Olivier Grégoire (fror)
- Andrei Savu (andreisavu)
- (tchdp)
- (squalloser)
- Yaroslav Matveychuk (yaroslavm)
- Stephan Schroevers (Stephan202)
- Chad (voiceinsideyou)
- Kevin Conaway (kevinconaway)
- Alberto Scotto (alb-i986)
- Ryan Holder(rholder)