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

#include <RetryStrategy.h>

+ Inheritance diagram for Aws::Client::StandardRetryStrategy:

Public Member Functions

 StandardRetryStrategy (long maxAttempts=3)
 
 StandardRetryStrategy (std::shared_ptr< RetryQuotaContainer > retryQuotaContainer, long maxAttempts=3)
 
virtual void RequestBookkeeping (const HttpResponseOutcome &httpResponseOutcome) override
 
virtual void RequestBookkeeping (const HttpResponseOutcome &httpResponseOutcome, const AWSError< CoreErrors > &lastError) override
 
virtual bool ShouldRetry (const AWSError< CoreErrors > &error, long attemptedRetries) const override
 
virtual 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 ()
 

Protected Attributes

std::shared_ptr< RetryQuotaContainerm_retryQuotaContainer
 
long m_maxAttempts
 

Detailed Description

Definition at line 101 of file RetryStrategy.h.

Constructor & Destructor Documentation

◆ StandardRetryStrategy() [1/2]

Aws::Client::StandardRetryStrategy::StandardRetryStrategy ( long  maxAttempts = 3)

◆ StandardRetryStrategy() [2/2]

Aws::Client::StandardRetryStrategy::StandardRetryStrategy ( std::shared_ptr< RetryQuotaContainer retryQuotaContainer,
long  maxAttempts = 3 
)

Member Function Documentation

◆ CalculateDelayBeforeNextRetry()

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

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::StandardRetryStrategy::GetMaxAttempts ( ) const
inlineoverridevirtual

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

Reimplemented from Aws::Client::RetryStrategy.

Definition at line 114 of file RetryStrategy.h.

◆ RequestBookkeeping() [1/2]

virtual void Aws::Client::StandardRetryStrategy::RequestBookkeeping ( const HttpResponseOutcome )
overridevirtual

Update status, like the information of retry quota when receiving a response.

Reimplemented from Aws::Client::RetryStrategy.

◆ RequestBookkeeping() [2/2]

virtual void Aws::Client::StandardRetryStrategy::RequestBookkeeping ( const HttpResponseOutcome httpResponseOutcome,
const AWSError< CoreErrors > &  lastError 
)
overridevirtual

Reimplemented from Aws::Client::RetryStrategy.

◆ ShouldRetry()

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

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

Implements Aws::Client::RetryStrategy.

Member Data Documentation

◆ m_maxAttempts

long Aws::Client::StandardRetryStrategy::m_maxAttempts
protected

Definition at line 118 of file RetryStrategy.h.

◆ m_retryQuotaContainer

std::shared_ptr<RetryQuotaContainer> Aws::Client::StandardRetryStrategy::m_retryQuotaContainer
protected

Definition at line 117 of file RetryStrategy.h.


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