[#BloombergLP-balm-CollectorRepository]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::CollectorRepository
:relfileprefix: ../../
:mrdocs:

This class defines a fully thread&hyphen;safe repository mechanism for `Collector` and `IntegerCollector` objects&period;

== Synopsis

Declared in `&lt;balm&lowbar;collectorrepository&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CollectorRepository;
----

== Description

Collectors are identified in the repository by a `MetricId` object and also grouped together according to the category of the metric&period; This repository supports operations to create, find, and collect metric records from the collectors in the repository&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balm/CollectorRepository/2constructor.adoc[`CollectorRepository`]         [.small]#[constructor]#
| Create an empty collector repository that will use the specified `registry` to identify the metrics for which it manages collectors&period;
| xref:BloombergLP/balm/CollectorRepository/2destructor.adoc[`&#126;CollectorRepository`] [.small]#[destructor]#
| Free all the collectors in this repository and destroy this object&period;
| xref:BloombergLP/balm/CollectorRepository/addCollector-09.adoc[`addCollector`] 
| `addCollector` overloads
| xref:BloombergLP/balm/CollectorRepository/addIntegerCollector-08.adoc[`addIntegerCollector`] 
| `addIntegerCollector` overloads
| xref:BloombergLP/balm/CollectorRepository/collect-06.adoc[`collect`] 
| `collect` overloads
| xref:BloombergLP/balm/CollectorRepository/collectAndReset-0f7.adoc[`collectAndReset`] 
| `collectAndReset` overloads
| xref:BloombergLP/balm/CollectorRepository/getAddedCollectors-09.adoc[`getAddedCollectors`] 
| `getAddedCollectors` overloads
| xref:BloombergLP/balm/CollectorRepository/getDefaultCollector-06.adoc[`getDefaultCollector`] 
| `getDefaultCollector` overloads
| xref:BloombergLP/balm/CollectorRepository/getDefaultIntegerCollector-05.adoc[`getDefaultIntegerCollector`] 
| `getDefaultIntegerCollector` overloads
| xref:BloombergLP/balm/CollectorRepository/registry-06.adoc[`registry`] 
| `registry` overloads
| xref:BloombergLP/balm/CollectorRepository/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;CollectorRepository, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===



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