Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RetryingHttpRequesterFilter: rename ofImmediate to ofImmediateBounded #2459

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Dec 9, 2022

Motivation:

It's not obvious for users that BackOffPolicy.ofImmediate() retries only 3 times.

Modifications:

  • Deprecated BackOffPolicy.ofImmediate();
  • Introduce BackOffPolicy.ofImmediateBounded() that behaves the same way;
  • Cache the returning value for BackOffPolicy.ofImmediateBounded();

Result:

Easier for users to understand that immediate BackOffPolicy has a limit for number of retries.

…unded`

Motivation:

It's not obvious for users that `BackOffPolicy.ofImmediate()` retries only 3 times.

Modifications:

- Deprecated `BackOffPolicy.ofImmediate()`;
- Introduce `BackOffPolicy.ofImmediateBounded()` that behaves the same way;
- Cache the returning value for `BackOffPolicy.ofImmediateBounded()`;

Result:

Easier for users to understand that immediate `BackOffPolicy` has a limit for
number of retries.
@idelpivnitskiy idelpivnitskiy changed the title RetryingHttpRequesterFilter: rename ofImmediate to ofImmediateWithDefaultLimit RetryingHttpRequesterFilter: rename ofImmediate to ofImmediateBounded Jan 6, 2023
@idelpivnitskiy
Copy link
Member Author

Discussed with @tkountis offline and he recommended another name: ofImmediateBounded() instead of ofImmediateWithDefaultLimit()

@idelpivnitskiy idelpivnitskiy merged commit 39356fd into apple:main Jan 6, 2023
@idelpivnitskiy idelpivnitskiy deleted the ofImmediate branch January 6, 2023 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants