class Azure::Storage::Common::Core::Filter::LinearRetryPolicyFilter

Constants

DEFAULT_RETRY_COUNT
DEFAULT_RETRY_INTERVAL

Public Class Methods

new(retry_count = nil, retry_interval = nil) click to toggle source
Calls superclass method
# File lib/azure/storage/common/core/filter/linear_retry_filter.rb, line 31
def initialize(retry_count = nil, retry_interval = nil)
  @retry_count = retry_count || LinearRetryPolicyFilter::DEFAULT_RETRY_COUNT
  @retry_interval = retry_interval || LinearRetryPolicyFilter::DEFAULT_RETRY_INTERVAL

  super @retry_count, @retry_interval
end

Public Instance Methods

apply_retry_policy(retry_data) click to toggle source

Overrides the base class implementation of call to determine how the HTTP request should continue retrying

retry_data - Hash. Stores stateful retry data

The retry_data is a Hash which can be used to store stateful data about the request execution context (such as an incrementing counter, timestamp, etc). The retry_data object will be the same instance throughout the lifetime of the request

# File lib/azure/storage/common/core/filter/linear_retry_filter.rb, line 50
def apply_retry_policy(retry_data)
  retry_data[:count] = retry_data[:count] == nil ? 1 : retry_data[:count] + 1
  retry_data[:interval] = @retry_interval
end