RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <service_base.h>
Classes | |
struct | Entry |
Public Member Functions | |
virtual Json::Value | getJson (const std::string &value, Watch watch=Watch()) |
virtual void | set (const std::string &key, const Json::Value &value) |
virtual std::string | setUnique (const std::string &key, const Json::Value &value) |
virtual std::vector< std::string > | getChildren (const std::string &key, Watch watch=Watch()) |
virtual bool | forEachEntry (const OnEntry &onEntry, const std::string &startPrefix="") const |
virtual void | removePath (const std::string &path) |
In-process configuration service with synchronization via locks.
Definition at line 290 of file service_base.h.
bool Datacratic::InternalConfigurationService::forEachEntry | ( | const OnEntry & | onEntry, |
const std::string & | startPrefix = "" |
||
) | const [virtual] |
Iterate over all entries in the configuration database recursively, calling the given callback. Note that no watches can be set using this function.
Implements Datacratic::ConfigurationService.
Definition at line 235 of file service_base.cc.
std::vector< std::string > Datacratic::InternalConfigurationService::getChildren | ( | const std::string & | key, |
Watch | watch = Watch() |
||
) | [virtual] |
Return the set of children for the given node. If the node does not exist, the watch will be set for the creation of the node itself.
Implements Datacratic::ConfigurationService.
Definition at line 218 of file service_base.cc.
Json::Value Datacratic::InternalConfigurationService::getJson | ( | const std::string & | value, |
Watch | watch = Watch() |
||
) | [virtual] |
Get the JSON value of a node. Will return a null value if the node doesn't exist.
Implements Datacratic::ConfigurationService.
Definition at line 164 of file service_base.cc.
void Datacratic::InternalConfigurationService::removePath | ( | const std::string & | path | ) | [virtual] |
Recursively remove everything below this path.
Implements Datacratic::ConfigurationService.
Definition at line 322 of file service_base.cc.
void Datacratic::InternalConfigurationService::set | ( | const std::string & | key, |
const Json::Value & | value | ||
) | [virtual] |
Set the value of a node.
Implements Datacratic::ConfigurationService.
Definition at line 178 of file service_base.cc.
std::string Datacratic::InternalConfigurationService::setUnique | ( | const std::string & | key, |
const Json::Value & | value | ||
) | [virtual] |
Set the value of a node, ensuring that it's created by adding a suffix if necessary. Returns the actual place under which it was added.
Implements Datacratic::ConfigurationService.
Definition at line 193 of file service_base.cc.