guava-retrying
guava-retrying copied to clipboard
`RetryListener`s are not only called on retry
Annoyance: This is a small annoyance; A RetryListener is not only called on a retry. It is called on each attempt. That includes the first call.
Proposed fix: Rename
RetryListenertoAttemptListener.RetryerBuilder#withRetryListenertoRetryerBuilder#withAttemptListener.
I understand that this will introduce backward incompatible change. I therefor propose this is a fix introduced for the next major version.
this really threw me off. came to file an issue, found this. strongly agree. this is an error, because the semantic name does not match the described behavior.
+1 found this same problem myself today. in it's current form it feels more like a plain old listener rather than specifically a retry Listener (https://github.com/rholder/guava-retrying/blob/master/src/main/java/com/github/rholder/retry/Retryer.java#L166)
+1 Any plans on resolving this?