BloombergLP::balm::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.

Synopsis

Declared in <balm_bdlmmetricsadapter.h>

class BdlmMetricsAdapter
    : public bdlm::MetricsAdapter

Base Classes

NameDescription
bdlm::MetricsAdapterThis protocol class provides a pure abstract interface and contract for clients and suppliers of metrics adapters.

Type Aliases

NameDescription
Callback Callback functor invoked to collect metric values.
CallbackHandle Opaque handle identifying a registered collection callback.

Member Functions

NameDescription
BdlmMetricsAdapter [constructor]Create a BdlmMetricsAdapter object that uses the specified metricsManager to register and unregister collection callback functors, the specified metricNamespace as the value returned by defaultNamespace(), and the specified objectIdentifierPrefix as the value returned by defaultObjectIdentifierPrefix. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.
~BdlmMetricsAdapter [destructor] [virtual]Destroy this BdlmMetricsAdapter object.
allocator Return the allocator used by this object to supply memory.
defaultMetricNamespace Return the namespace attribute value to be used as the default value for MetricDescriptor instances.
defaultObjectIdentifierPrefix Return a string to be used as the default prefix for a MetricDescriptor object identifier attribute value.
registerCollectionCallback registerCollectionCallback overloads
removeCollectionCallback [virtual]Remove the callback associated with the specified handle from the metrics manager specified at construction. Return 0 on success, or a non-zero value if handle cannot be found.
operator BloombergLP::bslmf::NestedTraitDeclaration<BdlmMetricsAdapter, UsesBslmaAllocator> Declare that this type uses a bslma allocator.