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. |
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.
-
<static> DEFAULT_CLIENT_MIN_RETRY_INTERVAL
-
Represents the default minimum retry interval, in milliseconds.
-
<static> DEFAULT_CLIENT_RETRY_COUNT
-
Represents the default client retry count.
-
<static> DEFAULT_CLIENT_RETRY_INTERVAL
-
Represents the default client retry interval, in milliseconds.
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.
-
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.
Returns:
Information about whether the operation qualifies for a retry and the retryInterval.
- Type
- retryInfo