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 7550184ba39d0..30a6bf8e7fed8 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 @@ 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. + *
* 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 + *
Backoff(attempts) = random(1 - jitter, 1 + jitter) * initialInterval * multiplier ^ attempts+ * If {@code initialInterval} is greater than or equal to {@code maxInterval}, a constant backoff of + * {@code initialInterval} will be provided. + *
+ * This class is thread-safe. */ public class ExponentialBackoff { private final int multiplier;