AWS SDK for C++  1.8.73
AWS SDK for C++
Public Member Functions | List of all members
Aws::Client::RetryStrategy Class Referenceabstract

#include <RetryStrategy.h>

+ Inheritance diagram for Aws::Client::RetryStrategy:

Public Member Functions

virtual ~RetryStrategy ()=default
 
virtual bool ShouldRetry (const AWSError< CoreErrors > &error, long attemptedRetries) const =0
 
virtual long CalculateDelayBeforeNextRetry (const AWSError< CoreErrors > &error, long attemptedRetries) const =0
 
virtual long GetMaxAttempts () const
 
virtual void GetSendToken ()
 
virtual void RequestBookkeeping (const HttpResponseOutcome &)
 
virtual void RequestBookkeeping (const HttpResponseOutcome &, const AWSError< CoreErrors > &)
 

Detailed Description

Interface for defining a Retry Strategy. Override this class to provide your own custom retry behavior.

Definition at line 36 of file RetryStrategy.h.

Constructor & Destructor Documentation

◆ ~RetryStrategy()

virtual Aws::Client::RetryStrategy::~RetryStrategy ( )
virtualdefault

Member Function Documentation

◆ CalculateDelayBeforeNextRetry()

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

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

Implemented in Aws::Client::StandardRetryStrategy, and Aws::Client::DefaultRetryStrategy.

◆ GetMaxAttempts()

virtual long Aws::Client::RetryStrategy::GetMaxAttempts ( ) const
inlinevirtual

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

Reimplemented in Aws::Client::StandardRetryStrategy, and Aws::Client::DefaultRetryStrategy.

Definition at line 54 of file RetryStrategy.h.

◆ GetSendToken()

virtual void Aws::Client::RetryStrategy::GetSendToken ( )
inlinevirtual

Retrives send tokens from the bucket.

Definition at line 59 of file RetryStrategy.h.

◆ RequestBookkeeping() [1/2]

virtual void Aws::Client::RetryStrategy::RequestBookkeeping ( const HttpResponseOutcome )
inlinevirtual

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

Reimplemented in Aws::Client::StandardRetryStrategy.

Definition at line 64 of file RetryStrategy.h.

◆ RequestBookkeeping() [2/2]

virtual void Aws::Client::RetryStrategy::RequestBookkeeping ( const HttpResponseOutcome ,
const AWSError< CoreErrors > &   
)
inlinevirtual

Reimplemented in Aws::Client::StandardRetryStrategy.

Definition at line 65 of file RetryStrategy.h.

◆ ShouldRetry()

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

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

Implemented in Aws::Client::StandardRetryStrategy, Aws::Client::SpecifiedRetryableErrorsRetryStrategy, and Aws::Client::DefaultRetryStrategy.


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