AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
DefaultRetryStrategy.h
Go to the documentation of this file.
1
6#pragma once
7
10
11namespace Aws
12{
13namespace Client
14{
15
17{
18public:
19
20 DefaultRetryStrategy(long maxRetries = 10, long scaleFactor = 25) :
21 m_scaleFactor(scaleFactor), m_maxRetries(maxRetries)
22 {}
23
24 bool ShouldRetry(const AWSError<CoreErrors>& error, long attemptedRetries) const override;
25
26 long CalculateDelayBeforeNextRetry(const AWSError<CoreErrors>& error, long attemptedRetries) const override;
27
28 virtual long GetMaxAttempts() const override { return m_maxRetries + 1; }
29
30protected:
33};
34
35} // namespace Client
36} // namespace Aws
#define AWS_CORE_API
Definition: Core_EXPORTS.h:26
virtual long GetMaxAttempts() const override
long CalculateDelayBeforeNextRetry(const AWSError< CoreErrors > &error, long attemptedRetries) const override
bool ShouldRetry(const AWSError< CoreErrors > &error, long attemptedRetries) const override
DefaultRetryStrategy(long maxRetries=10, long scaleFactor=25)