AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
DefaultRetryStrategy.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/client/RetryStrategy.h>
10
11namespace Aws
12{
13namespace Client
14{
15
16class AWS_CORE_API DefaultRetryStrategy : public RetryStrategy
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
30 const char* GetStrategyName() const override { return "default";}
31
32protected:
35};
36
37} // namespace Client
38} // namespace Aws
virtual long GetMaxAttempts() const override
long CalculateDelayBeforeNextRetry(const AWSError< CoreErrors > &error, long attemptedRetries) const override
const char * GetStrategyName() const override
bool ShouldRetry(const AWSError< CoreErrors > &error, long attemptedRetries) const override
DefaultRetryStrategy(long maxRetries=10, long scaleFactor=25)