[#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&period;

== Synopsis

Declared in `&lt;bdlm&lowbar;metricsadapter&period;h&gt;`

[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&period;
| xref:BloombergLP/bdlm/MetricsAdapter/CallbackHandle.adoc[`CallbackHandle`] 
| Opaque handle identifying a registered collection callback&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlm/MetricsAdapter/2destructor.adoc[`&#126;MetricsAdapter`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this `MetricsAdapter`&period;
| xref:BloombergLP/bdlm/MetricsAdapter/registerCollectionCallback.adoc[`registerCollectionCallback`]  [.small]#[virtual]#
| Register the specified `callback` with a monitoring system, using the specified `metricDescriptor` for the registration&period; Return the callback handle to be used with `removeCollectionCallback`&period; Note the information used for registration is implementation dependant, and may involve values computed from the supplied arguments&period;
| xref:BloombergLP/bdlm/MetricsAdapter/removeCollectionCallback.adoc[`removeCollectionCallback`]  [.small]#[virtual]#
| Remove the callback associated with the specified `handle`&period; Return 0 on success, or a non&hyphen;zero value if `handle` cannot be found&period;
|===


== 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&period; The implementation registers callbacks with a provided `balm&colon;&colon;MetricsManager` to enable monitoring of statistics collection objects&period;
|===


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