BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlm::MetricsRegistryRegistrationHandle Class Reference

#include <bdlm_metricsregistry.h>

Public Member Functions

 MetricsRegistryRegistrationHandle ()
 
 MetricsRegistryRegistrationHandle (bslmf::MovableRef< MetricsRegistryRegistrationHandle > original) BSLS_KEYWORD_NOEXCEPT
 
 ~MetricsRegistryRegistrationHandle ()
 
MetricsRegistryRegistrationHandleoperator= (bslmf::MovableRef< MetricsRegistryRegistrationHandle > original) BSLS_KEYWORD_NOEXCEPT
 
void swap (MetricsRegistryRegistrationHandle &other) BSLS_KEYWORD_NOEXCEPT
 
int unregister ()
 
bool isRegistered () const
 

Friends

class MetricsRegistry
 

Detailed Description

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

See bdlm_metricsregistry

Constructor & Destructor Documentation

◆ MetricsRegistryRegistrationHandle() [1/2]

bdlm::MetricsRegistryRegistrationHandle::MetricsRegistryRegistrationHandle ( )
inline

Create a MetricsRegistryRegstrationHandle object that is not associated with a registered metrics collection callback (isRegistered will return false).

◆ MetricsRegistryRegistrationHandle() [2/2]

bdlm::MetricsRegistryRegistrationHandle::MetricsRegistryRegistrationHandle ( bslmf::MovableRef< MetricsRegistryRegistrationHandle original)

Create a MetricsRegistryRegistrationHandle object that will manage the metric collection callback registration associated with the specified original handle. After creating this object, original will no longer manage the registration, and original.isRegistered() will be false. If original does not manage a registration when this object is created, then neither this object nor original will manage a registration.

◆ ~MetricsRegistryRegistrationHandle()

bdlm::MetricsRegistryRegistrationHandle::~MetricsRegistryRegistrationHandle ( )

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

Member Function Documentation

◆ isRegistered()

bool bdlm::MetricsRegistryRegistrationHandle::isRegistered ( ) const
inline

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

◆ operator=()

MetricsRegistryRegistrationHandle & bdlm::MetricsRegistryRegistrationHandle::operator= ( bslmf::MovableRef< MetricsRegistryRegistrationHandle original)

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.

◆ swap()

void bdlm::MetricsRegistryRegistrationHandle::swap ( MetricsRegistryRegistrationHandle other)
inline

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

◆ unregister()

int bdlm::MetricsRegistryRegistrationHandle::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 And Related Symbol Documentation

◆ MetricsRegistry

friend class MetricsRegistry
friend

The documentation for this class was generated from the following file: