guava-retrying icon indicating copy to clipboard operation
guava-retrying copied to clipboard

Make it possible to get a builder from a Retryer instance for further customisation

Open andreisavu opened this issue 12 years ago • 2 comments

Sometimes the code that's using the Retreyer instance needs to add more conditions or update the retry / wait strategies.

andreisavu avatar Mar 17 '14 20:03 andreisavu

This could be quite useful. I'm thinking just returning the builder that was used to create the Retryer instance might be the simplest way to go here. It can then be updated and a new instance can be built with the new settings. Swapping out the old Retryer instance and updating the builder might have some thread safety implications, but overall it'd still be nice to have. Did you have a better API in mind that you'd prefer to use? I'm open to suggestions (and pull requests...).

rholder avatar Mar 24 '14 06:03 rholder

Agree - exposing the initial builder should be enough. I'm still exploring options. Safe publication is something the library user should handle anyway.

andreisavu avatar Mar 27 '14 23:03 andreisavu