AWS SDK for C++  1.9.106
AWS SDK for C++
Public Types | Public Member Functions | List of all members
Aws::Utils::RateLimits::RateLimiterInterface Class Referenceabstract

#include <RateLimiterInterface.h>

+ Inheritance diagram for Aws::Utils::RateLimits::RateLimiterInterface:

Public Types

using DelayType = std::chrono::milliseconds

Public Member Functions

virtual ~RateLimiterInterface ()
virtual DelayType ApplyCost (int64_t cost)=0
virtual void ApplyAndPayForCost (int64_t cost)=0
virtual void SetRate (int64_t rate, bool resetAccumulator=false)=0

Detailed Description

Interface for bandwidth limiters. You likely don't want to implement your own as DefaultRateLimiter is probably what you need. If you need to implement one, then this is the interface to implement.

Definition at line 23 of file RateLimiterInterface.h.

Member Typedef Documentation

◆ DelayType

Definition at line 26 of file RateLimiterInterface.h.

Constructor & Destructor Documentation

◆ ~RateLimiterInterface()

virtual Aws::Utils::RateLimits::RateLimiterInterface::~RateLimiterInterface ( )

Definition at line 28 of file RateLimiterInterface.h.

Member Function Documentation

◆ ApplyAndPayForCost()

virtual void Aws::Utils::RateLimits::RateLimiterInterface::ApplyAndPayForCost ( int64_t  cost)
pure virtual

Same as ApplyCost() but then goes ahead and sleeps the current thread.

Implemented in Aws::Utils::RateLimits::DefaultRateLimiter< CLOCK, DUR, RENORMALIZE_RATE_CHANGES >.

◆ ApplyCost()

virtual DelayType Aws::Utils::RateLimits::RateLimiterInterface::ApplyCost ( int64_t  cost)
pure virtual

Calculates time in milliseconds that should be delayed before letting anymore data through.

Implemented in Aws::Utils::RateLimits::DefaultRateLimiter< CLOCK, DUR, RENORMALIZE_RATE_CHANGES >.

◆ SetRate()

virtual void Aws::Utils::RateLimits::RateLimiterInterface::SetRate ( int64_t  rate,
bool  resetAccumulator = false 
pure virtual

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