[#BloombergLP-balb-RateLimiter-supportsRateLimitsExactly]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/RateLimiter.adoc[RateLimiter]::supportsRateLimitsExactly
:relfileprefix: ../../../
:mrdocs:

Return whether the given limits are preserved exactly by this class&period;

== Synopsis

Declared in `&lt;balb&lowbar;ratelimiter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
supportsRateLimitsExactly(
    xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] sustainedRateLimit,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& sustainedRateWindow,
    xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] peakRateLimit,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& peakRateWindow);
----

== Description

Returns `true` if, supposing the specified `sustainedRateLimit`, `sustainedRateWindow`, `peakRateLimit`, and `peakRateWindow` are used to initialize a `RateLimiter` object, the corresponding query methods return the same values&period; The implementation of `RateLimiter` uses `balb&colon;&colon;LeakyBucket` objects, and for some combinations of values the capacity of the `balb&colon;&colon;LeakyBucket` is rounded such that the rederived values differ&period; Note that this method is most likely to return `true` when the product of each corresponding pair of limit and window (as a fraction of a second) is integral&period;

== Return Value

`true` if a limiter initialized with these limits would report the same values from its query methods

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sustainedRateLimit*
| sustained rate in units per second
| *sustainedRateWindow*
| sustained&hyphen;rate time&hyphen;window
| *peakRateLimit*
| peak rate in units per second
| *peakRateWindow*
| peak&hyphen;rate time&hyphen;window
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
