-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RetryingHttpRequesterFilter
: add on request retry callback (#2916)
Motivation: There are use-cases when users need to perform an action before the retry, like updating meta-data or logging/metrics. Because all retry functions return `BackoffPolicy`, it's still not known inside the function of `BackoffPolicy` will retry or not because of the retry counts limit. Modifications: - Add `RetryingHttpRequesterFilter.Builder.onRequestRetry(RetryCallbacks)` that users can use to intercept every retry attempt; - Test that the new callback works for request retries; Result: Users can see when the retry actually happens, after backoff time. If there will be a similar use-case for `reserveConnection` in the future, we will add a separate callback.
- Loading branch information
1 parent
a65238c
commit 7919d3a
Showing
3 changed files
with
119 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.