If you have a method that fails occasionally and you want to retry it a few times before throwing an exception.
@RetryOnFailure from jcabi-aspects can help. For example, if you're downloading the following web page:
This method call will throw an exception only after three failed executions with a ten seconds interval between them.
load() from the example above is called, this is what is happening behind the scene (pseudo-code):
This approach may be very useful in the following situations (based on my experience):
Loading data from HTTP, S3, FTP, etc resources
Uploading data over the network
Fetching data through RESTful stateless API-s
The project is in GitHub.