RetryHandler.ShouldRetry Method

Specifies whether retry should be implemented.

Namespace: Microsoft.WindowsAzure
Assembly: Microsoft.WindowsAzure.Common (in Microsoft.WindowsAzure.Common.dll)

Usage

'Usage
Dim request As HttpRequestMessage
Dim response As HttpResponseMessage
Dim retryCount As Integer
Dim retryInterval As TimeSpan
Dim returnValue As Boolean

returnValue = Me.ShouldRetry(request, response, retryCount, retryInterval)

Syntax

'Declaration
Protected MustOverride Function ShouldRetry ( _
    request As HttpRequestMessage, _
    response As HttpResponseMessage, _
    retryCount As Integer, _
    <OutAttribute> ByRef retryInterval As TimeSpan _
) As Boolean
protected abstract bool ShouldRetry (
    HttpRequestMessage request,
    HttpResponseMessage response,
    int retryCount,
    out TimeSpan retryInterval
)
protected:
virtual bool ShouldRetry (
    HttpRequestMessage^ request, 
    HttpResponseMessage^ response, 
    int retryCount, 
    [OutAttribute] TimeSpan% retryInterval
) abstract
protected abstract boolean ShouldRetry (
    HttpRequestMessage request, 
    HttpResponseMessage response, 
    int retryCount, 
    /** @attribute OutAttribute() */ /** @ref */ TimeSpan retryInterval
)

Parameters

  • request
    The request message.
  • response
    The response to the request.
  • retryCount
    The number of retry attempts.
  • retryInterval
    The time interval to retry.

Return Value

true if retry should be implemented; 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

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also

Reference

RetryHandler Class
RetryHandler Members
Microsoft.WindowsAzure Namespace