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. |
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.
-
<static> DEFAULT_CLIENT_RETRY_INTERVAL
-
Represents the default client retry interval, in milliseconds.
Methods
-
handle(requestOptions, next)
-
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.
-
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