[#BloombergLP-bdlm-MetricsRegistry-removeMetricsAdapter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlm.adoc[bdlm]::xref:BloombergLP/bdlm/MetricsRegistry.adoc[MetricsRegistry]::removeMetricsAdapter
:relfileprefix: ../../../
:mrdocs:

Remove `adapter` if it is the adapter associated with this registry&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
removeMetricsAdapter(xref:BloombergLP/bdlm/MetricsAdapter.adoc[MetricsAdapter]* adapter);
----

== Description

If the specified `adapter` is the currently associated adapter, remove all registered metrics from it and disassociate with this registry&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that this operation takes an `adapter` to disambiguate multiple, potentially concurrent, calls to this method and `setMetricsAdapter`&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *adapter*
| metrics adapter to disassociate if currently associated
|===


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