![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
Classes | |
| struct | AllAugmentorInfo |
| struct | AugmentorInfoEntry |
| struct | Entry |
Public Types | |
|
typedef boost::function< void(const std::shared_ptr < AugmentationInfo > &)> | OnFinished |
| typedef TimeoutMap< Id, std::shared_ptr< Entry > > | Augmenting |
| typedef ML::Spinlock | Lock |
| typedef boost::unique_lock< Lock > | Guard |
Public Member Functions | |
| AugmentationLoop (ServiceBase &parent, const std::string &name="augmentationLoop") | |
| AugmentationLoop (std::shared_ptr< ServiceProxies > proxies, const std::string &name="augmentationLoop") | |
| void | init () |
| void | start () |
| void | sleepUntilIdle () |
| void | shutdown () |
| size_t | numAugmenting () const |
| bool | currentlyAugmenting (const Id &auctionId) const |
| void | bindAugmentors (const std::string &uri) |
| void | augment (const std::shared_ptr< AugmentationInfo > &info, Date timeout, const OnFinished &onFinished) |
| void | updateAllAugmentors () |
| void | handleAugmentorMessage (const std::vector< std::string > &message) |
| void | checkExpiries () |
| void | doConfig (const std::vector< std::string > &message) |
| void | doResponse (const std::vector< std::string > &message) |
| void | doAugment (const std::vector< std::string > &message) |
| void | augmentationExpired (const Id &id, const Entry &entry) |
Public Attributes | |
| Augmenting | augmenting |
| std::map< std::string, std::shared_ptr< AugmentorInfo > > | augmentors |
| AllAugmentorInfo * | allAugmentors |
| GcLock | allAugmentorsGc |
| int | idle_ |
|
TypedMessageSink < std::shared_ptr< Entry > > | inbox |
| We pick up augmentations to be done from here. | |
| ZmqNamedClientBus | toAugmentors |
| Connection to all of our augmentors. | |
| ML::Spinlock | lock |
Definition at line 68 of file augmentation_loop.h.
| typedef TimeoutMap<Id, std::shared_ptr<Entry> > RTBKIT::AugmentationLoop::Augmenting |
List of auctions we're currently augmenting. Once the augmentation process is finished the auction will be passed on.
Definition at line 104 of file augmentation_loop.h.
| void RTBKIT::AugmentationLoop::augment | ( | const std::shared_ptr< AugmentationInfo > & | info, |
| Date | timeout, | ||
| const OnFinished & | onFinished | ||
| ) |
Push an auction into the augmentor. Can be called from any thread.
Definition at line 372 of file augmentation_loop.cc.
| void RTBKIT::AugmentationLoop::doAugment | ( | const std::vector< std::string > & | message | ) |
Handle a message asking for augmentation.
| void RTBKIT::AugmentationLoop::doConfig | ( | const std::vector< std::string > & | message | ) |
Handle a configuration message from an augmentor.
Definition at line 505 of file augmentation_loop.cc.
| void RTBKIT::AugmentationLoop::doResponse | ( | const std::vector< std::string > & | message | ) |
Handle a response from an augmentation.
Definition at line 559 of file augmentation_loop.cc.
Update the augmentors from the configuration settings.
Definition at line 327 of file augmentation_loop.cc.
Pointer to current version. Protected by allAgentsGc.
Definition at line 125 of file augmentation_loop.h.
RCU protection for allAgents.
Definition at line 128 of file augmentation_loop.h.
| std::map<std::string, std::shared_ptr<AugmentorInfo> > RTBKIT::AugmentationLoop::augmentors |
Currently configured augmentors. Indexed by the augmentor name.
Definition at line 108 of file augmentation_loop.h.
Global flag for idle.
Reimplemented from Datacratic::MessageLoop.
Definition at line 130 of file augmentation_loop.h.
1.7.6.1