![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <master_banker.h>
Public Types | |
| typedef ML::Spinlock | Lock |
| typedef std::unique_lock< Lock > | Guard |
Public Member Functions | |
| MasterBanker (std::shared_ptr< ServiceProxies > proxies, const std::string &serviceName="masterBanker") | |
| void | init (const std::shared_ptr< BankerPersistence > &storage) |
| void | start () |
|
std::pair< std::string, std::string > | bindTcp () |
| void | shutdown () |
| void | bindFixedHttpAddress (const std::string &uri) |
| Json::Value | createAccount (const AccountKey &key, AccountType type) |
| void | saveState () |
| void | loadStateSync () |
| void | onStateLoaded (std::shared_ptr< Accounts > newAccounts, BankerPersistence::PersistenceCallbackStatus status, const std::string &info) |
| void | onStateSaved (BankerPersistence::PersistenceCallbackStatus status, const std::string &info) |
| std::string | getProviderName () const |
| Json::Value | getProviderIndicators () const |
Public Attributes | |
|
std::shared_ptr < BankerPersistence > | storage_ |
| RestRequestRouter | router |
| Accounts | accounts |
| Date | lastSavedState |
| BankerPersistence::PersistenceCallbackStatus | lastSaveStatus |
| Lock | saveLock |
| int | saving |
| MonitorProviderClient | monitorProviderClient |
| Date | lastWin |
| Date | lastImpression |
Master banker class. This provides a REST interface to an underlying banker implementation.
Definition at line 238 of file master_banker.h.
| void RTBKIT::MasterBanker::bindFixedHttpAddress | ( | const std::string & | uri | ) |
Bind the HTTP REST endpoint to the given address on a fixed port, for services that must be discoverable via DNS.
The address will still be published into Zookeeper.
example: "*:4444", "localhost:8888"
Definition at line 612 of file master_banker.cc.
| string RTBKIT::MasterBanker::getProviderName | ( | ) | const [virtual] |
MonitorProvider interface
Implements RTBKIT::MonitorProvider.
Definition at line 619 of file master_banker.cc.
| void RTBKIT::MasterBanker::loadStateSync | ( | ) |
Load the entire state sychronously. Will return once the state has been loaded.
Definition at line 588 of file master_banker.cc.
| void RTBKIT::MasterBanker::saveState | ( | ) |
Save the entire state asynchronously. Will return straight away.
Definition at line 549 of file master_banker.cc.
1.7.6.1