Class: LinearRetryPolicyFilter

LinearRetryPolicyFilter

The LinearRetryPolicyFilter allows you to retry operations, using an linear back-off interval between retries. To apply a filter to service operations, use withFilter and specify the filter to be used when creating a service.

new LinearRetryPolicyFilter(retryCount, retryInterval)

Creates a new LinearRetryPolicyFilter instance.

Parameters:
Name Type Argument Default Description
retryCount number <optional>
3

The client retry count.

retryInterval number <optional>
30000

The client retry interval, in milliseconds.

Source:
Example
var azure = require('azure-storage');
var retryOperations = new azure.LinearRetryPolicyFilter();
var blobService = azure.createBlobService().withFilter(retryOperations)

Members

<static> DEFAULT_CLIENT_RETRY_COUNT

Represents the default client retry count.

Source:

<static> DEFAULT_CLIENT_RETRY_INTERVAL

Represents the default client retry interval, in milliseconds.

Source:

Methods

handle(requestOptions, next) → {undefined}

Handles an operation with a linear retry policy.

Parameters:
Name Type Description
requestOptions Object

The original request options.

next function

The next filter to be handled.

Source:
Returns:
Type
undefined

shouldRetry(statusCode, requestOptions) → {retryInfo}

Determines if the operation should be retried and how long to wait until the next retry.

Parameters:
Name Type Description
statusCode number

The HTTP status code.

requestOptions object

The request options.

Source:
Returns:

Information about whether the operation qualifies for a retry and the retryInterval.

Type
retryInfo