ExponentialRetryPolicyFilter class

Constructors

ExponentialRetryPolicyFilter(number, number, number, number)

Creates a new 'ExponentialRetryPolicyFilter' instance.

Example

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

Properties

DEFAULT_CLIENT_MAX_RETRY_INTERVAL

Represents the default maximum retry interval, in milliseconds.

DEFAULT_CLIENT_MIN_RETRY_INTERVAL

Represents the default minimum retry interval, in milliseconds.

DEFAULT_CLIENT_RETRY_COUNT

Represents the default client retry count.

DEFAULT_CLIENT_RETRY_INTERVAL

Represents the default client retry interval, in milliseconds.

maxRetryInterval
minRetryInterval
retryCount
retryInterval

Methods

handle(RequestOptions, Next)
shouldRetry(number, IRetryRequestOptions)

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

Constructor Details

ExponentialRetryPolicyFilter(number, number, number, number)

Creates a new 'ExponentialRetryPolicyFilter' instance.

Example

var azure = require('azure-storage');
var retryOperations = new azure.ExponentialRetryPolicyFilter();
var blobService = azure.createBlobService().withFilter(retryOperations)
new ExponentialRetryPolicyFilter(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number)

Parameters

retryCount

number

The client retry count.

retryInterval

number

The client retry interval, in milliseconds.

minRetryInterval

number

The minimum retry interval, in milliseconds.

maxRetryInterval

number

The maximum retry interval, in milliseconds.

Property Details

DEFAULT_CLIENT_MAX_RETRY_INTERVAL

Represents the default maximum retry interval, in milliseconds.

static DEFAULT_CLIENT_MAX_RETRY_INTERVAL: number

Property Value

number

DEFAULT_CLIENT_MIN_RETRY_INTERVAL

Represents the default minimum retry interval, in milliseconds.

static DEFAULT_CLIENT_MIN_RETRY_INTERVAL: number

Property Value

number

DEFAULT_CLIENT_RETRY_COUNT

Represents the default client retry count.

static DEFAULT_CLIENT_RETRY_COUNT: number

Property Value

number

DEFAULT_CLIENT_RETRY_INTERVAL

Represents the default client retry interval, in milliseconds.

static DEFAULT_CLIENT_RETRY_INTERVAL: number

Property Value

number

maxRetryInterval

maxRetryInterval: number

Property Value

number

minRetryInterval

minRetryInterval: number

Property Value

number

retryCount

retryCount: number

Property Value

number

retryInterval

retryInterval: number

Property Value

number

Method Details

handle(RequestOptions, Next)

function handle(requestOptions: RequestOptions, next: Next)

Parameters

requestOptions

azure-storage.export=.common.RequestOptions

next

azure-storage.export=.common.filters.Next

shouldRetry(number, IRetryRequestOptions)

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

function shouldRetry(statusCode: number, retryData: IRetryRequestOptions): { retryInterval: number, retryable: boolean }

Parameters

statusCode

number

The HTTP status code.

retryData

azure-storage.export=.common.filters.retrypolicyfilter.RetryPolicyFilter.IRetryRequestOptions

The retry data.

Returns

{ retryInterval: number, retryable: boolean }

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