Package com.azure.core.amqp
Class FixedAmqpRetryPolicy
- java.lang.Object
-
- com.azure.core.amqp.AmqpRetryPolicy
-
- com.azure.core.amqp.FixedAmqpRetryPolicy
-
public class FixedAmqpRetryPolicy extends AmqpRetryPolicy
A policy to govern retrying of messaging operations in which the base delay between retries remains the same.
-
-
Constructor Summary
Constructors Constructor Description FixedAmqpRetryPolicy(AmqpRetryOptions retryOptions)Creates an instance with the given retry options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DurationcalculateRetryDelay(int retryCount, Duration baseDelay, Duration baseJitter, ThreadLocalRandom random)Calculates the delay for a fixed backoff.booleanequals(Object obj)inthashCode()-
Methods inherited from class com.azure.core.amqp.AmqpRetryPolicy
calculateRetryDelay, getMaxRetries, getRetryOptions
-
-
-
-
Constructor Detail
-
FixedAmqpRetryPolicy
public FixedAmqpRetryPolicy(AmqpRetryOptions retryOptions)
Creates an instance with the given retry options.- Parameters:
retryOptions- The options to set on this retry policy.
-
-
Method Detail
-
calculateRetryDelay
protected Duration calculateRetryDelay(int retryCount, Duration baseDelay, Duration baseJitter, ThreadLocalRandom random)
Calculates the delay for a fixed backoff.- Specified by:
calculateRetryDelayin classAmqpRetryPolicy- Parameters:
retryCount- The number of attempts that have been made, including the initial attempt before any retries.baseDelay- The delay to use for the fixed backoff.baseJitter- The duration to use for the basis of the random jitter value.random- The random number generator used to calculate the jitter.- Returns:
- The duration to delay before retrying a request.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAmqpRetryPolicy
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAmqpRetryPolicy
-
-