This class implements a registration handle that provides RAII semantics for metric registration.

Synopsis

Declared in <bdlm_metricsregistry.h>

class MetricsRegistryRegistrationHandle;

Member Functions

Name

Description

MetricsRegistryRegistrationHandle [constructor]

Constructors

~MetricsRegistryRegistrationHandle [destructor]

Unregister the metric collection callback associated with this handle (if isRegistered is true), and destroy this object.

operator=

Unregister the metric collection callback associated with this handle (if isRegistered is true). Take an ownership on the metric collection callback registration associated with the specified original handle. Afterwards, original will no longer manage the registration, and original.isRegistered() will be false.

isRegistered

Return true if this handle has an associated registered metrics collection callback.

swap

Exchange the associated metric collection callback registration with the one controlled by the specified other handle.

unregister

Unregister the metric from the associated registry. Return 0 on success, and a non‐zero value if this handle is not currently associated with a registered metrics collection callback.

Friends

Name

Description

BloombergLP::bdlm::MetricsRegistry

This class implements a mechanism that provides a registry of metrics that is transferable to implementations of the bdlm::MetricsAdapter protocol. This class is usually a singleton.

Created with MrDocs