![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <account.h>
Inherited by RTBKIT::ShadowAccounts::AccountEntry.
Classes | |
| struct | Commitment |
Public Member Functions | |
| void | checkInvariants () const |
| Json::Value | toJson () const |
| void | forceWinBid (Amount amountPaid, const LineItems &lineItems) |
| void | commitDetachedBid (Amount amountAuthorized, Amount amountPaid, const LineItems &lineItems) |
| Commit a bid that has been detached from its tracking. | |
| bool | authorizeBid (const std::string &item, Amount amount) |
| void | commitBid (const std::string &item, Amount amountPaid, const LineItems &lineItems) |
| void | cancelBid (const std::string &item) |
| Amount | detachBid (const std::string &item) |
| void | attachBid (const std::string &item, Amount amount) |
| const Account | syncToMaster (Account &masterAccount) const |
| void | syncFromMaster (const Account &masterAccount) |
| void | initializeAndMergeState (const Account &masterAccount) |
| void | logBidEvents (const Datacratic::EventRecorder &eventRecorder, const std::string &accountKey) |
Static Public Member Functions | |
| static const ShadowAccount | fromJson (const Json::Value &val) |
Public Attributes | |
| CurrencyPool | netBudget |
| net of fields not mentioned here | |
| CurrencyPool | commitmentsRetired |
| CurrencyPool | commitmentsMade |
| CurrencyPool | spent |
| CurrencyPool | balance |
| LineItems | lineItems |
| DERIVED; debit - credit. | |
|
std::unordered_map < std::string, Commitment > | commitments |
| uint32_t | attachedBids |
| uint32_t | detachedBids |
| uint32_t | lastExpiredCommitments |
This is an account that can track spend. It is a shadow of an account that lives in the master banker, and only keeps track of a small amount of information.
| void RTBKIT::ShadowAccount::initializeAndMergeState | ( | const Account & | masterAccount | ) | [inline] |
This method should be called exactly once the first time that a shadow account receives its initial state from the master.
It will merge any changes that have been made since initialization with the initial state from the master, in such a way that the state will be the same as if the account had been synchronized before any operations had occurred and then all operations had been replayed.
1.7.6.1