fesa-core  5.0.1
fesa::HasMetrics Class Reference

#include <HasMetrics.h>

Inheritance diagram for fesa::HasMetrics:
fesa::AbstractEventSource fesa::AbstractRTAction fesa::LogicalEventImpl fesa::NotificationConsumer fesa::NotificationProducer fesa::RDAExporter fesa::RTScheduler fesa::MultiThreadedEventSource fesa::OnDemandEventSource fesa::RTAction< DeviceType > fesa::RTDiagnosticSetting fesa::OnSubscriptionEventSource

Public Member Functions

 HasMetrics (const std::string &componentName)
 

Protected Member Functions

template<typename T >
void registerMetric (const std::string &name, T &value)
 
template<typename T >
void registerMetric (const std::string &name, boost::atomic< T > &value)
 

Detailed Description

Helper class which allows its subclasses to use the registerMetric() method.

Constructor & Destructor Documentation

fesa::HasMetrics::HasMetrics ( const std::string &  componentName)

The component name given to this constructor will be used when registering metrics.

Parameters
componentNamethe component name to use

Member Function Documentation

template<typename T >
void fesa::HasMetrics::registerMetric ( const std::string &  name,
T &  value 
)
protected

Registers a metric on a primitive data type. It is recommended that the value be atomically updated; otherwise, consistency in metric values cannot be guaranteed. Implementations read the value atomically when updating metrics.

Parameters
namename of the metric
valuereference to the value that will be monitored
template<typename T >
void fesa::HasMetrics::registerMetric ( const std::string &  name,
boost::atomic< T > &  value 
)
protected

Registers an atomic metric, that is, a metric which monitors a value of type boost::atomic<T>.

Parameters
namename of the metric
valuereference to the value that will be monitored

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