16 #ifndef HAZELCAST_CLIENT_INTERNAL_CONFIG_CONFIGUTILS_H_ 17 #define HAZELCAST_CLIENT_INTERNAL_CONFIG_CONFIGUTILS_H_ 21 #include "hazelcast/client/config/ConfigPatternMatcher.h" 22 #include "hazelcast/util/SynchronizedMap.h" 23 #include "hazelcast/util/ILogger.h" 35 static boost::shared_ptr<T>
37 util::SynchronizedMap<std::string, T> &configPatterns,
const std::string &itemName) {
38 boost::shared_ptr<T> candidate = configPatterns.get(itemName);
39 if (candidate.get() != NULL) {
42 boost::shared_ptr<std::string> configPatternKey = configPatternMatcher.
matches(
43 configPatterns.keys(), itemName);
44 if (configPatternKey.get() != NULL) {
45 return configPatterns.get(*configPatternKey);
47 return boost::shared_ptr<T>();
virtual boost::shared_ptr< std::string > matches(const std::vector< std::string > &configPatterns, const std::string &itemName) const =0
Returns the best match for an item name out of a list of configuration patterns.
The ConfigPatternMatcher provides a strategy to match an item name to a configuration pattern...
Definition: ConfigPatternMatcher.h:41
Utility class to access configuration.
Definition: ConfigUtils.h:32
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32