|
BDE 4.14.0 Production release
|
#include <balm_collectorrepository.h>
This class defines a fully thread-safe repository mechanism for Collector and IntegerCollector objects. Collectors are identified in the repository by a MetricId object and also grouped together according to the category of the metric. This repository supports operations to create, find, and collect metric records from the collectors in the repository.
|
inline |
Create an empty collector repository that will use the specified registry to identify the metrics for which it manages collectors. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined if registry is 0.
|
inline |
|
inline |
Return a shared pointer to a newly-created modifiable collector identified by the specified null-terminated strings category and metricName, and add that collector to the repository. If is not already registered, also add the identified metric to the metricRegistry supplied at construction. Note that this operation is logically equivalent to:
| bsl::shared_ptr< Collector > balm::CollectorRepository::addCollector | ( | const MetricId & | metricId | ) |
Return a shared pointer to a newly-created modifiable collector identified by the specified metricId and add that collector to the repository. The behavior is undefined unless metricId is a valid id returned by the MetricRepository supplied at construction.
|
inline |
Return a shared pointer to a newly created modifiable integer collector identified by the specified category and metricName and add that collector to the repository. If is not already registered, also add the identified metric to the metricRegistry supplied at construction. The behavior is undefined unless category and metricName are null-terminated. Note that this operation is logically equivalent to:
| bsl::shared_ptr< IntegerCollector > balm::CollectorRepository::addIntegerCollector | ( | const MetricId & | metricId | ) |
Return a shared pointer to a newly-created modifiable collector identified by the specified metricId and add that collector to the repository. The behavior is undefined unless metricId is a valid id returned by the MetricRepository supplied at construction.
| balm::CollectorRepository::BSLMF_NESTED_TRAIT_DECLARATION | ( | CollectorRepository | , |
| bslma::UsesBslmaAllocator | |||
| ) |
| void balm::CollectorRepository::collect | ( | bsl::vector< MetricRecord > * | records, |
| const Category * | category | ||
| ) |
| void balm::CollectorRepository::collect | ( | std::vector< MetricRecord > * | records, |
| const Category * | category | ||
| ) |
| void balm::CollectorRepository::collectAndReset | ( | bsl::vector< MetricRecord > * | records, |
| const Category * | category | ||
| ) |
| void balm::CollectorRepository::collectAndReset | ( | std::vector< MetricRecord > * | records, |
| const Category * | category | ||
| ) |
| int balm::CollectorRepository::getAddedCollectors | ( | bsl::vector< bsl::shared_ptr< Collector > > * | collectors, |
| bsl::vector< bsl::shared_ptr< IntegerCollector > > * | intCollectors, | ||
| const MetricId & | metricId | ||
| ) |
| int balm::CollectorRepository::getAddedCollectors | ( | std::vector< bsl::shared_ptr< Collector > > * | collectors, |
| std::vector< bsl::shared_ptr< IntegerCollector > > * | intCollectors, | ||
| const MetricId & | metricId | ||
| ) |
|
inline |
Return the address of the modifiable default collector identified by the specified null-terminated strings category and metricName. If a collector for the identified metric does not already exist in the repository, create one, add it to the repository, and return its address. In addition, if the identified metric has not already been registered, add the identified metric to the metricRegistry supplied at construction. Note that this operation is logically equivalent to:
Return the address of the modifiable default collector identified by the specified metricId. If a default collector for the identified metric does not already exist in the repository, create one, add it to the repository, and return its address.
|
inline |
Return the address of the modifiable default integer collector identified by the specified category and metricName. If a default integer collector for the identified metric does not already exist in the repository, create one, add it to the repository, and return its address. In addition, if the identified metric has not already been registered, add the identified metric to the metricRegistry supplied at construction. The behavior is undefined unless category and metricName are null-terminated. Note that this operation is logically equivalent to:
| IntegerCollector * balm::CollectorRepository::getDefaultIntegerCollector | ( | const MetricId & | metricId | ) |
Return the address of the modifiable default integer collector identified by the specified metricId. If a default integer collector for the identified metric does not already exist in the repository, create one, add it to the repository, and return its address.
|
inline |
Return a reference to the modifiable registry of metrics used by this collector repository.
|
inline |
Return a reference to the non-modifiable registry of metrics used by this collector repository.