17 #ifndef CONFIGURATION_MANAGER_HPP_
18 #define CONFIGURATION_MANAGER_HPP_
22 #include <boost/thread/mutex.hpp>
23 #include <boost/smart_ptr/shared_ptr.hpp>
24 #include <boost/signals2.hpp>
54 void onDeltaRecevied(
int index,
const avro::GenericDatum & data,
bool full_resync);
68 void updateRecord(boost::shared_ptr<ICommonRecord> rec,
const avro::GenericDatum &data);
75 bool isSubscribed(
uuid_t uuid);
83 void subscribe(
uuid_t uuid, boost::shared_ptr<ICommonRecord> record);
90 void unsubscribe(
uuid_t uuid);
92 typedef boost::mutex mutex_type;
93 typedef boost::unique_lock<mutex_type> lock_type;
95 std::map<uuid_t, boost::shared_ptr<ICommonRecord> > records_;
96 boost::shared_ptr<ICommonRecord> root_;
98 mutex_type configurationGuard_;
99 boost::signals2::signal<void (ICommonRecord &)> configurationReceivers_;
void onConfigurationProcessed()
boost::uuids::uuid uuid_t
void subscribeForConfigurationChanges(IConfigurationReceiver &receiver)
void unsubscribeFromConfigurationChanges(IConfigurationReceiver &receiver)
void onDeltaRecevied(int index, const avro::GenericDatum &data, bool full_resync)
ICommonRecord & getConfiguration()