[#BloombergLP-bdlm-MetricsAdapter] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlm.adoc[bdlm]::MetricsAdapter :relfileprefix: ../../ :mrdocs: This protocol class provides a pure abstract interface and contract for clients and suppliers of metrics adapters. == Synopsis Declared in `<bdlm_metricsadapter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MetricsAdapter; ---- == 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/bdlm/MetricsAdapter/2destructor.adoc[`~MetricsAdapter`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this `MetricsAdapter`. | xref:BloombergLP/bdlm/MetricsAdapter/registerCollectionCallback.adoc[`registerCollectionCallback`] [.small]#[virtual]# | Register the specified `callback` with a monitoring system, using the specified `metricDescriptor` for the registration. Return the callback handle to be used with `removeCollectionCallback`. Note the information used for registration is implementation dependant, and may involve values computed from the supplied arguments. | xref:BloombergLP/bdlm/MetricsAdapter/removeCollectionCallback.adoc[`removeCollectionCallback`] [.small]#[virtual]# | Remove the callback associated with the specified `handle`. Return 0 on success, or a non‐zero value if `handle` cannot be found. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/BdlmMetricsAdapter.adoc[`BdlmMetricsAdapter`] | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#