[#BloombergLP-bdlm-MetricsRegistry] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlm.adoc[bdlm]::MetricsRegistry :relfileprefix: ../../ :mrdocs: This class implements a transferable registry of metrics. == Synopsis Declared in `<bdlm_metricsregistry.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MetricsRegistry; ---- == Description This class implements a mechanism that provides a registry of metrics that is transferable to implementations of the `bdlm::MetricsAdapter` protocol. This class is _usually_ a singleton. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlm/MetricsRegistry/Callback.adoc[`Callback`] | This `typedef` is an alias for a metrics registration callback. | xref:BloombergLP/bdlm/MetricsRegistry/CallbackHandle.adoc[`CallbackHandle`] | This `typedef` is an alias for a metrics registration callback handle. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlm/MetricsRegistry/2constructor.adoc[`MetricsRegistry`] [.small]#[constructor]# | Create a registry that can forward metric registrations to an adapter. | xref:BloombergLP/bdlm/MetricsRegistry/2destructor.adoc[`~MetricsRegistry`] [.small]#[destructor]# | Unregister all registered metrics and destroy this `MetricsRegistry` object. | xref:BloombergLP/bdlm/MetricsRegistry/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bdlm/MetricsRegistry/disableMetricsCollection.adoc[`disableMetricsCollection`] | Disable metrics collection. | xref:BloombergLP/bdlm/MetricsRegistry/enableMetricsCollection.adoc[`enableMetricsCollection`] | Enable metrics collection. | xref:BloombergLP/bdlm/MetricsRegistry/numRegisteredCollectionCallbacks.adoc[`numRegisteredCollectionCallbacks`] | Return the number of registered metrics collection callbacks. | xref:BloombergLP/bdlm/MetricsRegistry/registerCollectionCallback.adoc[`registerCollectionCallback`] | Register a metric collection callback and load a handle into `result`. | xref:BloombergLP/bdlm/MetricsRegistry/removeMetricsAdapter.adoc[`removeMetricsAdapter`] | Remove `adapter` if it is the adapter associated with this registry. | xref:BloombergLP/bdlm/MetricsRegistry/setMetricsAdapter.adoc[`setMetricsAdapter`] | Configure this registry to use the specified `adapter`. | xref:BloombergLP/bdlm/MetricsRegistry/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<MetricsRegistry, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlm/MetricsRegistry/defaultInstance.adoc[`defaultInstance`] | Return a non‐`const` reference to the metrics registry singleton. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#