This is an automated email from the ASF dual-hosted git repository.
cegerton pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new d143d349ec6 MINOR: ExponentialBackoff Javadoc improvements (#13317)
d143d349ec6 is described below
commit d143d349ec6b51e0d95bbc794a21f93091c876fe
Author: Yash Mayya <[email protected]>
AuthorDate: Tue Feb 28 19:57:37 2023 +0530
MINOR: ExponentialBackoff Javadoc improvements (#13317)
Reviewers: Chris Egerton <[email protected]>
---
.../org/apache/kafka/common/utils/ExponentialBackoff.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java
b/clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java
index 7550184ba39..30a6bf8e7fe 100644
---
a/clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java
+++
b/clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java
@@ -20,12 +20,15 @@ package org.apache.kafka.common.utils;
import java.util.concurrent.ThreadLocalRandom;
/**
- * An utility class for keeping the parameters and providing the value of
exponential
+ * A utility class for keeping the parameters and providing the value of
exponential
* retry backoff, exponential reconnect backoff, exponential timeout, etc.
+ * <p>
* The formula is:
- * Backoff(attempts) = random(1 - jitter, 1 + jitter) * initialInterval *
multiplier ^ attempts
- * If initialInterval is greater or equal than maxInterval, a constant backoff
of will be provided
- * This class is thread-safe
+ * <pre>Backoff(attempts) = random(1 - jitter, 1 + jitter) * initialInterval *
multiplier ^ attempts</pre>
+ * If {@code initialInterval} is greater than or equal to {@code maxInterval},
a constant backoff of
+ * {@code initialInterval} will be provided.
+ * <p>
+ * This class is thread-safe.
*/
public class ExponentialBackoff {
private final int multiplier;