Package org.apache.pinot.spi.utils.retry
Class ExponentialBackoffRetryPolicy
- java.lang.Object
-
- org.apache.pinot.spi.utils.retry.BaseRetryPolicy
-
- org.apache.pinot.spi.utils.retry.ExponentialBackoffRetryPolicy
-
- All Implemented Interfaces:
RetryPolicy
public class ExponentialBackoffRetryPolicy extends BaseRetryPolicy
Retry policy with exponential backoff delay between attempts.The delay between the ith and (i + 1)th attempts is between delayScaleFactori * initialDelayMs and delayScaleFactor(i + 1) * initialDelayMs.
-
-
Constructor Summary
Constructors Constructor Description ExponentialBackoffRetryPolicy(int maxNumAttempts, long initialDelayMs, double delayScaleFactor)
-
Method Summary
Modifier and Type Method Description protected longgetDelayMs(int currentAttempt)Gets the delay in milliseconds before the next attempt.-
Methods inherited from class org.apache.pinot.spi.utils.retry.BaseRetryPolicy
attempt
-
-
-
-
Method Detail
-
getDelayMs
protected long getDelayMs(int currentAttempt)
Description copied from class:BaseRetryPolicyGets the delay in milliseconds before the next attempt.- Specified by:
getDelayMsin classBaseRetryPolicy- Parameters:
currentAttempt- Current attempt number- Returns:
- Delay in milliseconds
-
-