[#BloombergLP-balb-LeakyBucket-setRateAndCapacity]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/LeakyBucket.adoc[LeakyBucket]::setRateAndCapacity
:relfileprefix: ../../../
:mrdocs:

Set the drain rate of this leaky bucket to the specified `newRate` and the capacity of this leaky bucket to the specified `newCapacity`&period; The behavior is undefined unless `0 &lt; newRate` and `0 &lt; newCapacity`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setRateAndCapacity(
    xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] newRate,
    xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] newCapacity);
----


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