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

Reserve the specified `numUnits` for future use by this leaky bucket&period; The behavior is undefined unless &apos;unitsReserved() &plus; unitsInBucket() &plus; numUnits&apos; can be represented by a 64&hyphen;bit unsigned integral type&period; Note that after this operation, this bucket may overflow&period; Also note that the time interval between the invocations of `reserve` and `submitReserved` or `cancelReserved` should be kept as short as possible&semi; otherwise, the precision of the time interval calculated by `calculateTimeToSubmit` may be negatively affected&period;

== Synopsis

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

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


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