public class FixedDelay extends Object implements RetryStrategy
RetryStrategy
that has a fixed delay duration between each retry attempt.HTTP_STATUS_TOO_MANY_REQUESTS
Constructor and Description |
---|
FixedDelay(int maxRetries,
Duration delay)
Creates an instance of
FixedDelay . |
Modifier and Type | Method and Description |
---|---|
Duration |
calculateRetryDelay(int retryAttempts)
Computes the delay between each retry.
|
int |
getMaxRetries()
Max number of retry attempts to be make.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shouldRetry, shouldRetryException
public FixedDelay(int maxRetries, Duration delay)
FixedDelay
.maxRetries
- The max number of retry attempts that can be made.delay
- The fixed delay duration between retry attempts.public int getMaxRetries()
RetryStrategy
getMaxRetries
in interface RetryStrategy
public Duration calculateRetryDelay(int retryAttempts)
RetryStrategy
calculateRetryDelay
in interface RetryStrategy
retryAttempts
- The number of retry attempts completed so far.Copyright © 2021 Microsoft Corporation. All rights reserved.