RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Member Functions | Static Public Member Functions | Public Attributes
RTBKIT::ShadowAccount Struct Reference

#include <account.h>

Inherited by RTBKIT::ShadowAccounts::AccountEntry.

List of all members.

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

Detailed Description

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.

Definition at line 411 of file account.h.


Member Function Documentation

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.

Definition at line 648 of file account.h.


Member Data Documentation

DERIVED; debit - credit.

Line items for spend

Definition at line 426 of file account.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator