public class ExponentialAmqpRetryPolicy extends AmqpRetryPolicy
| Constructor and Description |
|---|
ExponentialAmqpRetryPolicy(AmqpRetryOptions retryOptions)
Creates a new instance with a minimum and maximum retry period in addition to maximum number of retry attempts.
|
| Modifier and Type | Method and Description |
|---|---|
protected Duration |
calculateRetryDelay(int retryCount,
Duration baseDelay,
Duration baseJitter,
ThreadLocalRandom random)
Calculates the retry delay using exponential backoff.
|
boolean |
equals(Object obj) |
int |
hashCode() |
calculateRetryDelay, getMaxRetries, getRetryOptionspublic ExponentialAmqpRetryPolicy(AmqpRetryOptions retryOptions)
retryOptions - The options to apply to this retry policy.NullPointerException - if retryOptions is null.protected Duration calculateRetryDelay(int retryCount, Duration baseDelay, Duration baseJitter, ThreadLocalRandom random)
calculateRetryDelay in class AmqpRetryPolicyretryCount - The number of attempts that have been made, including the initial attempt before any
retries.baseDelay - The delay to use for the basis of the exponential backoff.baseJitter - The duration to use for the basis of the random jitter value.random - The random number generator used to calculate the jitter.public int hashCode()
hashCode in class AmqpRetryPolicypublic boolean equals(Object obj)
equals in class AmqpRetryPolicyCopyright © 2021 Microsoft Corporation. All rights reserved.