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.
- Add Java 11 support
- Use java.util.Predicate and java.util.Function instead of Guava equivalents
- Make compatible with latest versions of Guava
- Fix all errorprone warnings in original source code
- Versions < 6.0.0 require Java 8+
- Version 6+ require Java 11+
The library is available on Maven Central.
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>6.0.1</version>
<scope>test</scope>
</dependency>
Add the following to your build.gradle
:
repositories {
mavenCentral()
}
dependencies {
testCompile 'com.arakelian:retry:6.0.1'
}
Apache Version 2.0
Javadoc can be found here.
The retry module is released under version 2.0 of the Apache License.
- 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)