LinearRetryHandler.ShouldRetry Method

Specifies whether to retry.

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 Overrides Function ShouldRetry ( _
    request As HttpRequestMessage, _
    response As HttpResponseMessage, _
    retryCount As Integer, _
    <OutAttribute> ByRef retryInterval As TimeSpan _
) As Boolean
protected override bool ShouldRetry (
    HttpRequestMessage request,
    HttpResponseMessage response,
    int retryCount,
    out TimeSpan retryInterval
)
protected:
virtual bool ShouldRetry (
    HttpRequestMessage^ request, 
    HttpResponseMessage^ response, 
    int retryCount, 
    [OutAttribute] TimeSpan% retryInterval
) override
protected boolean ShouldRetry (
    HttpRequestMessage request, 
    HttpResponseMessage response, 
    int retryCount, 
    /** @attribute OutAttribute() */ /** @ref */ TimeSpan retryInterval
)

Parameters

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

Return Value

true to attempt a retry; 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

LinearRetryHandler Class
LinearRetryHandler Members
Microsoft.WindowsAzure Namespace