FixedBackOff has a method maxAttempt() source, documented laconically as:
/**
* Return the maximum number of attempts.
*/
Meanwhile RetryPolicy and related Builder are using maxRetries, with a way more helpful documentation.
Due to the difference in naming, and the explicit use of the term total attempts in the later documentation, I was expecting maxAttempt to be related to total attempts. After some testing, it is in fact actually a max retries attempts
The use of maxRetries can be traced to #35772 and I think that FixedBackOff was forgotten in that renaming.
While this ship as sailed and it is too late to rename the FixBackOff.maxAttempt() method to maxRetries, the documentation can be improved.
FixedBackOffhas a methodmaxAttempt()source, documented laconically as:Meanwhile
RetryPolicyand related Builder are usingmaxRetries, with a way more helpful documentation.Due to the difference in naming, and the explicit use of the term
total attemptsin the later documentation, I was expectingmaxAttemptto be related tototal attempts. After some testing, it is in fact actually amax retries attemptsThe use of
maxRetriescan be traced to #35772 and I think thatFixedBackOffwas forgotten in that renaming.While this ship as sailed and it is too late to rename the
FixBackOff.maxAttempt()method tomaxRetries, the documentation can be improved.