AWS SDK for C++  1.9.175
AWS SDK for C++
Public Member Functions | Protected Attributes | List of all members
Aws::Client::DefaultRetryStrategy Class Reference

#include <DefaultRetryStrategy.h>

+ Inheritance diagram for Aws::Client::DefaultRetryStrategy:

Public Member Functions

 DefaultRetryStrategy (long maxRetries=10, long scaleFactor=25)
bool ShouldRetry (const AWSError< CoreErrors > &error, long attemptedRetries) const override
long CalculateDelayBeforeNextRetry (const AWSError< CoreErrors > &error, long attemptedRetries) const override
virtual long GetMaxAttempts () const override
- Public Member Functions inherited from Aws::Client::RetryStrategy
virtual ~RetryStrategy ()=default
virtual void GetSendToken ()
virtual bool HasSendToken ()
virtual void RequestBookkeeping (const HttpResponseOutcome &)
virtual void RequestBookkeeping (const HttpResponseOutcome &, const AWSError< CoreErrors > &)

Protected Attributes

long m_scaleFactor
long m_maxRetries

Detailed Description

Definition at line 16 of file DefaultRetryStrategy.h.

Constructor & Destructor Documentation

◆ DefaultRetryStrategy()

Aws::Client::DefaultRetryStrategy::DefaultRetryStrategy ( long  maxRetries = 10,
long  scaleFactor = 25 

Definition at line 20 of file DefaultRetryStrategy.h.

Member Function Documentation

◆ CalculateDelayBeforeNextRetry()

long Aws::Client::DefaultRetryStrategy::CalculateDelayBeforeNextRetry ( const AWSError< CoreErrors > &  error,
long  attemptedRetries 
) const

Calculates the time in milliseconds the client should sleep before attempting another request based on the error and attemptedRetries count.

Implements Aws::Client::RetryStrategy.

◆ GetMaxAttempts()

virtual long Aws::Client::DefaultRetryStrategy::GetMaxAttempts ( ) const

Gets max number of attempts allowed for an operation. Returns non positive value if not defined.

Reimplemented from Aws::Client::RetryStrategy.

Definition at line 28 of file DefaultRetryStrategy.h.

◆ ShouldRetry()

bool Aws::Client::DefaultRetryStrategy::ShouldRetry ( const AWSError< CoreErrors > &  error,
long  attemptedRetries 
) const

Returns true if the error can be retried given the error and the number of times already tried.

Implements Aws::Client::RetryStrategy.

Reimplemented in Aws::Client::SpecifiedRetryableErrorsRetryStrategy.

Member Data Documentation

◆ m_maxRetries

long Aws::Client::DefaultRetryStrategy::m_maxRetries

Definition at line 32 of file DefaultRetryStrategy.h.

◆ m_scaleFactor

long Aws::Client::DefaultRetryStrategy::m_scaleFactor

Definition at line 31 of file DefaultRetryStrategy.h.

The documentation for this class was generated from the following file: