Class: ExponentialRetryPolicyFilter

ExponentialRetryPolicyFilter

The ExponentialRetryPolicyFilter allows you to retry operations,
using an exponential 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 ExponentialRetryPolicyFilter( [retryCount] [, retryInterval] [, minRetryInterval] [, maxRetryInterval])

Creates a new 'ExponentialRetryPolicyFilter' 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.

minRetryInterval number <optional>
3000

The minimum retry interval, in milliseconds.

maxRetryInterval number <optional>
90000

The maximum retry interval, in milliseconds.

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

Members


<static> DEFAULT_CLIENT_MAX_RETRY_INTERVAL

Represents the default maximum retry interval, in milliseconds.

Source:

<static> DEFAULT_CLIENT_MIN_RETRY_INTERVAL

Represents the default minimum retry interval, in milliseconds.

Source:

<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)

Handles an operation with an exponential retry policy.

Parameters:
Name Type Description
requestOptions Object

The original request options.

next function

The next filter to be handled.

Source:

shouldRetry(statusCode, requestOptions)

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