Determines whether the operation should be retried and the interval until the next retry.
Namespace: Microsoft.WindowsAzure.Storage.RetryPolicies
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Usage
Visual Basic |
---|
Dim instance As ExponentialRetry
Dim currentRetryCount As Integer
Dim statusCode As Integer
Dim lastException As Exception
Dim retryInterval As TimeSpan
Dim operationContext As OperationContext
Dim returnValue As Boolean
returnValue = instance.ShouldRetry(currentRetryCount, statusCode, lastException, retryInterval, operationContext) |
Syntax
Visual Basic |
---|
Public Function ShouldRetry ( _
currentRetryCount As Integer, _
statusCode As Integer, _
lastException As Exception, _
<OutAttribute> ByRef retryInterval As TimeSpan, _
operationContext As OperationContext _
) As Boolean |
C# |
---|
public bool ShouldRetry (
int currentRetryCount,
int statusCode,
Exception lastException,
out TimeSpan retryInterval,
OperationContext operationContext
) |
C++ |
---|
public:
virtual bool ShouldRetry (
int currentRetryCount,
int statusCode,
Exception^ lastException,
[OutAttribute] TimeSpan% retryInterval,
OperationContext^ operationContext
) sealed |
J# |
---|
public final boolean ShouldRetry (
int currentRetryCount,
int statusCode,
Exception lastException,
/** @attribute OutAttribute() */ /** @ref */ TimeSpan retryInterval,
OperationContext operationContext
) |
Parameters
- currentRetryCount
An integer specifying the number of retries for the given operation. A value of zero signifies this is the first error encountered.
- statusCode
An integer containing the status code for the last operation.
- lastException
An Exception object that represents the last exception encountered.
- retryInterval
A TimeSpan indicating the interval to wait until the next retry.
- operationContext
An OperationContext object that represents the context for the current operation.
Return Value
true
if the operation should be retried; otherwise,
false
.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
See Also