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

Support creating Retryer instance using a spec string #61

Open vivekkothari opened 8 years ago

vivekkothari commented 8 years ago

Hi,

This library is awesome. One small thing will improve is even further. The way guava cache can be created using a spec string, it would be awesome if I can create a retryer using a spec. Advantages: In prod deployments, I just need to configure 1 config property which can tweak the retryer to any extent. Currently I would need to have different configs properties for different strategies. If we can come up with some sort of DSL, it would be possible. Please suggest a format I will try to raise a PR.

vivekkothari commented 8 years ago

some thing like https://google.github.io/guava/releases/17.0/api/docs/com/google/common/cache/CacheBuilderSpec.html