Package org.apache.pinot.spi.utils.retry
Class RandomDelayRetryPolicy
- java.lang.Object
-
- org.apache.pinot.spi.utils.retry.BaseRetryPolicy
-
- org.apache.pinot.spi.utils.retry.RandomDelayRetryPolicy
-
- All Implemented Interfaces:
RetryPolicy
public class RandomDelayRetryPolicy extends BaseRetryPolicy
Delay policy with random delay between attempts.
-
-
Constructor Summary
Constructors Constructor Description RandomDelayRetryPolicy(int maxNumAttempts, long minDelayMs, long maxDelayMs)
-
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
-
-