fesa-core  5.0.1
fesa::MetricsManager Class Reference

#include <MetricsManager.h>

Public Member Functions

virtual const std::vector
< Metric * > & 
getMetrics (const std::string &componentName) const
 
virtual const MetricgetMetric (const std::string &componentName, const std::string &metricName) const
 
template<typename T >
void registerMetric (const std::string &componentName, const std::string &metricName, T &metric)
 
template<typename T >
void registerMetric (const std::string &componentName, const std::string &metricName, boost::atomic< T > &metric)
 

Detailed Description

Interface of a metrics manager, with a dummy implementation. Can be overriden to provide real metrics management. Subclasses should override all private registerXXXMetric and registerAtomicXXXMetric methods.

Member Function Documentation

const Metric & fesa::MetricsManager::getMetric ( const std::string &  componentName,
const std::string &  metricName 
) const
virtual

Returns the corresponding metric.

Exceptions
FesaExceptionif no corresponding metric exists
const std::vector< Metric * > & fesa::MetricsManager::getMetrics ( const std::string &  componentName) const
virtual

Returns the vector of Metrics currently registered for the given component name

template<typename T >
void fesa::MetricsManager::registerMetric ( const std::string &  componentName,
const std::string &  metricName,
T &  metric 
)

Registers a metric by calling the appropriate private registerXXXMetric method.

Parameters
componentNamename of the component
namename of the metric
metricreference to the value to be monitored
template<typename T >
void fesa::MetricsManager::registerMetric ( const std::string &  componentName,
const std::string &  metricName,
boost::atomic< T > &  metric 
)

Registers an atomic metric by calling the appropriate private registerAtomicXXXMetric method.

Parameters
componentNamename of the component
namename of the metric
metricreference to the value to be monitored

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