summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/MetricsAdminI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-09-17 10:16:43 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-09-17 10:16:43 +0200
commit5a85eebb5e9162260ffb93f217b16f229976288b (patch)
tree93ca91d69e9303d4895d743b7bc08d77741bdb7f /cpp/src/Ice/MetricsAdminI.cpp
parentFixed to remove need for calling updateViews after map registration (diff)
downloadice-5a85eebb5e9162260ffb93f217b16f229976288b.tar.bz2
ice-5a85eebb5e9162260ffb93f217b16f229976288b.tar.xz
ice-5a85eebb5e9162260ffb93f217b16f229976288b.zip
Moved some MX classes to IceInternal
Diffstat (limited to 'cpp/src/Ice/MetricsAdminI.cpp')
-rw-r--r--cpp/src/Ice/MetricsAdminI.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp
index 53448eb1173..0c91b0e4791 100644
--- a/cpp/src/Ice/MetricsAdminI.cpp
+++ b/cpp/src/Ice/MetricsAdminI.cpp
@@ -20,6 +20,7 @@
using namespace std;
using namespace Ice;
+using namespace IceInternal;
using namespace IceMX;
namespace
@@ -119,21 +120,13 @@ MetricsMapI::RegExp::~RegExp()
}
bool
-MetricsMapI::RegExp::match(const MetricsHelper& helper, bool reject)
+MetricsMapI::RegExp::match(const string& value, bool reject)
{
- try
- {
- string value = helper(_attribute);
#ifndef ICE_CPP11_REGEXP
- return regexec(&_preg, value.c_str(), 0, 0, 0) == 0;
+ return regexec(&_preg, value.c_str(), 0, 0, 0) == 0;
#else
- return regex_match(value, _regex);
+ return regex_match(value, _regex);
#endif
- }
- catch(const std::exception&)
- {
- return !reject;
- }
}
MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& properties) :
@@ -365,6 +358,7 @@ MetricsViewI::getMap(const string& mapName) const
MetricsAdminI::MetricsAdminI(const PropertiesPtr& properties, const LoggerPtr& logger) :
_logger(logger), _properties(properties)
{
+ updateViews();
}
void