[#BloombergLP-bdlmt-Throttle] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::Throttle :relfileprefix: ../../ :mrdocs: Mechanism that regulates the frequency at which actions may be taken. == Synopsis Declared in `<bdlmt_throttle.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class Throttle; ---- == Description This `class` provides a mechanism that can be used by clients to regulate the frequency at which actions can be taken. The data members of `Throttle` are currently public to allow for compile‐time (aggregate) initialization of `Throttle` objects having static storage duration (for C++03 compilers that do not provide `constexpr`). == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/Throttle/clockType.adoc[`clockType`] | Return the system clock type with which this `Throttle` is configured to observe the passage of time. | xref:BloombergLP/bdlmt/Throttle/initialize-03.adoc[`initialize`] | `initialize` overloads | xref:BloombergLP/bdlmt/Throttle/maxSimultaneousActions.adoc[`maxSimultaneousActions`] | Return the maximum number of simultaneous actions for which this `Throttle` is configured to permit. | xref:BloombergLP/bdlmt/Throttle/nanosecondsPerAction.adoc[`nanosecondsPerAction`] | Return the time debt, in nanoseconds, that this `Throttle` is configured to incur for each action permitted. | xref:BloombergLP/bdlmt/Throttle/nextPermit.adoc[`nextPermit`] | Load the earliest time when the specified actions will be permitted. | xref:BloombergLP/bdlmt/Throttle/requestPermission-0da.adoc[`requestPermission`] | `requestPermission` overloads | xref:BloombergLP/bdlmt/Throttle/requestPermissionIfValid-01.adoc[`requestPermissionIfValid`] | `requestPermissionIfValid` overloads |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/Throttle/d_clockType.adoc[`d_clockType`] | Clock type (monotonic or realtime) used by this throttle. | xref:BloombergLP/bdlmt/Throttle/d_maxSimultaneousActions.adoc[`d_maxSimultaneousActions`] | Total bucket capacity expressed in actions. | xref:BloombergLP/bdlmt/Throttle/d_nanosecondsPerAction.adoc[`d_nanosecondsPerAction`] | Nanoseconds consumed by each sustained action. | xref:BloombergLP/bdlmt/Throttle/d_nanosecondsPerTotalReset.adoc[`d_nanosecondsPerTotalReset`] | Total bucket capacity expressed in nanoseconds. | xref:BloombergLP/bdlmt/Throttle/d_prevLeakTime.adoc[`d_prevLeakTime`] | Effective time of the previous leak operation. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlmt/Throttle/k_TEN_YEARS_NANOSECONDS.adoc[`k_TEN_YEARS_NANOSECONDS`] | Ten years expressed in nanoseconds. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlmt/Throttle_InitHelper.adoc[BloombergLP::bdlmt::Throttle_InitHelper]` | Private helper that validates compile‐time throttle initialization arguments. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#