[#BloombergLP-balm-BdlmMetricsAdapter] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::BdlmMetricsAdapter :relfileprefix: ../../ :mrdocs: This class implements a pure abstract interface for clients and suppliers of metrics adapters. The implementation registers callbacks with a provided `balm::MetricsManager` to enable monitoring of statistics collection objects. == Synopsis Declared in `<balm_bdlmmetricsadapter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class BdlmMetricsAdapter : public xref:BloombergLP/bdlm/MetricsAdapter.adoc[bdlm::MetricsAdapter] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlm/MetricsAdapter.adoc[bdlm::MetricsAdapter]` | This protocol class provides a pure abstract interface and contract for clients and suppliers of metrics adapters. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlm/MetricsAdapter/Callback.adoc[`Callback`] | Callback functor invoked to collect metric values. | xref:BloombergLP/bdlm/MetricsAdapter/CallbackHandle.adoc[`CallbackHandle`] | Opaque handle identifying a registered collection callback. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/BdlmMetricsAdapter/2constructor.adoc[`BdlmMetricsAdapter`] [.small]#[constructor]# | Create a `BdlmMetricsAdapter` object that uses the specified `metricsManager` to register and unregister collection callback functors, the specified `metricNamespace` as the value returned by `defaultNamespace()`, and the specified `objectIdentifierPrefix` as the value returned by `defaultObjectIdentifierPrefix`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. | xref:BloombergLP/balm/BdlmMetricsAdapter/2destructor.adoc[`~BdlmMetricsAdapter`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this `BdlmMetricsAdapter` object. | xref:BloombergLP/balm/BdlmMetricsAdapter/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/balm/BdlmMetricsAdapter/defaultMetricNamespace.adoc[`defaultMetricNamespace`] | Return the namespace attribute value to be used as the default value for `MetricDescriptor` instances. | xref:BloombergLP/balm/BdlmMetricsAdapter/defaultObjectIdentifierPrefix.adoc[`defaultObjectIdentifierPrefix`] | Return a string to be used as the default prefix for a `MetricDescriptor` object identifier attribute value. | xref:BloombergLP/balm/BdlmMetricsAdapter/registerCollectionCallback-02.adoc[`registerCollectionCallback`] | `registerCollectionCallback` overloads | xref:BloombergLP/balm/BdlmMetricsAdapter/removeCollectionCallback.adoc[`removeCollectionCallback`] [.small]#[virtual]# | Remove the callback associated with the specified `handle` from the metrics manager specified at construction. Return 0 on success, or a non‐zero value if `handle` cannot be found. | xref:BloombergLP/balm/BdlmMetricsAdapter/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<BdlmMetricsAdapter, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#