rholder / guava-retrying

This is a small extension to Google's Guava library to allow for the creation of configurable retrying strategies for an arbitrary function call, such as something that talks to a remote service with flaky uptime.
Apache License 2.0
1.43k stars 275 forks source link

RetryerBuilder having protected constructor #76

Open yogenyadav opened 7 years ago

yogenyadav commented 7 years ago

Hi, I want to extend RetryerBuilder and add a method like retryIfExceptionMessage which will retry on contents of the message.

JensRantil commented 7 years ago

Best practise is extension should be done through composition, not inheritance. Are you sure you simply can't implement a StopStrategy which also is a RetryListener and register your implementation on the builder?

smartvolshell commented 6 years ago

com.github.rholder.retry.RetryerBuilder#retryIfException(com.google.common.base.Predicate) this method to meet you.