Interface IRetryPolicy
- Namespace
- Microsoft.WindowsAzure.Storage.RetryPolicies
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents a retry policy.
public interface IRetryPolicy
Methods
CreateInstance()
Generates a new retry policy for the current request attempt.
IRetryPolicy CreateInstance()
Returns
- IRetryPolicy
An IRetryPolicy object that represents the retry policy for the current request attempt.
ShouldRetry(int, int, Exception, out TimeSpan, OperationContext)
Determines whether the operation should be retried and the interval until the next retry.
bool ShouldRetry(int currentRetryCount, int statusCode, Exception lastException, out TimeSpan retryInterval, OperationContext operationContext)
Parameters
currentRetryCount
intAn integer specifying the number of retries for the given operation. A value of zero signifies this is the first error encountered.
statusCode
intAn integer containing the status code for the last operation.
lastException
ExceptionAn Exception object that represents the last exception encountered.
retryInterval
TimeSpanA TimeSpan indicating the interval to wait until the next retry.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- bool
true
if the operation should be retried; otherwise,false
.