AWS SDK for C++  1.9.17
AWS SDK for C++
RateLimiterInterface.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
10 #include <stdint.h>
11 #include <chrono>
12 
13 namespace Aws
14 {
15  namespace Utils
16  {
17  namespace RateLimits
18  {
24  {
25  public:
26  using DelayType = std::chrono::milliseconds;
27 
28  virtual ~RateLimiterInterface() {}
32  virtual DelayType ApplyCost(int64_t cost) = 0;
36  virtual void ApplyAndPayForCost(int64_t cost) = 0;
40  virtual void SetRate(int64_t rate, bool resetAccumulator = false) = 0;
41  };
42 
43  } // namespace RateLimits
44  } // namespace Utils
45 } // namespace Aws
Aws::Utils::RateLimits::RateLimiterInterface::~RateLimiterInterface
virtual ~RateLimiterInterface()
Definition: RateLimiterInterface.h:28
Aws::Utils::RateLimits::RateLimiterInterface::ApplyAndPayForCost
virtual void ApplyAndPayForCost(int64_t cost)=0
Aws::Utils::RateLimits::RateLimiterInterface::ApplyCost
virtual DelayType ApplyCost(int64_t cost)=0
Aws::Utils::RateLimits::RateLimiterInterface::SetRate
virtual void SetRate(int64_t rate, bool resetAccumulator=false)=0
Core_EXPORTS.h
Aws::Utils::RateLimits::RateLimiterInterface::DelayType
std::chrono::milliseconds DelayType
Definition: RateLimiterInterface.h:26
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::RateLimits::RateLimiterInterface
Definition: RateLimiterInterface.h:24