#include <DbiCache.h>
Collaboration diagram for DbiCache:
Public Types | |
typedef std::list< DbiResult * > | ResultList_t |
Public Member Functions | |
DbiCache (DbiTableProxy &qp, const string &tableName) | |
virtual | ~DbiCache () |
UInt_t | GetMaxSize () const |
UInt_t | GetCurSize () const |
UInt_t | GetNumAdopted () const |
UInt_t | GetNumReused () const |
const DbiResult * | Search (const Context &vc, const Dbi::SubSite &subsite, const Dbi::Task &task) const |
Primary searches. | |
const DbiResult * | Search (const string &sqlQualifiers) const |
const DbiResult * | Search (const DbiValidityRec &vr, const string &sqlQualifiers="") const |
Secondary search. | |
ostream & | ShowStatistics (ostream &msg) const |
void | Adopt (DbiResult *res, bool registerKey=true) |
void | Purge () |
void | SetStale () |
Private Member Functions | |
DbiCache (const DbiCache &) | |
DbiCache & | operator= (const DbiCache &) |
const ResultList_t * | GetSubCache (Int_t aggNo) const |
void | Purge (ResultList_t &subCache, const DbiResult *res=0) |
Private Attributes | |
DbiTableProxy & | fTableProxy |
TableProxy owning cache. | |
const string & | fTableName |
Name of associated table. | |
std::map< Int_t, ResultList_t > | fCache |
Map of sub-caches indexed by aggregate number. | |
UInt_t | fCurSize |
Current size. | |
UInt_t | fMaxSize |
Max (high water) size. | |
UInt_t | fNumAdopted |
Total number adopted. | |
UInt_t | fNumReused |
Number reused i.e. found. |
Definition at line 41 of file DbiCache.h.
typedef std::list<DbiResult*> DbiCache::ResultList_t |
Definition at line 47 of file DbiCache.h.
DbiCache::DbiCache | ( | DbiTableProxy & | qp, | |
const string & | tableName | |||
) |
virtual DbiCache::~DbiCache | ( | ) | [virtual] |
DbiCache::DbiCache | ( | const DbiCache & | ) | [private] |
UInt_t DbiCache::GetMaxSize | ( | ) | const [inline] |
UInt_t DbiCache::GetCurSize | ( | ) | const [inline] |
UInt_t DbiCache::GetNumAdopted | ( | ) | const [inline] |
UInt_t DbiCache::GetNumReused | ( | ) | const [inline] |
const DbiResult* DbiCache::Search | ( | const Context & | vc, | |
const Dbi::SubSite & | subsite, | |||
const Dbi::Task & | task | |||
) | const |
Primary searches.
const DbiResult* DbiCache::Search | ( | const string & | sqlQualifiers | ) | const |
const DbiResult* DbiCache::Search | ( | const DbiValidityRec & | vr, | |
const string & | sqlQualifiers = "" | |||
) | const |
Secondary search.
ostream& DbiCache::ShowStatistics | ( | ostream & | msg | ) | const |
void DbiCache::Adopt | ( | DbiResult * | res, | |
bool | registerKey = true | |||
) |
void DbiCache::Purge | ( | ) |
void DbiCache::SetStale | ( | ) |
const ResultList_t* DbiCache::GetSubCache | ( | Int_t | aggNo | ) | const [private] |
void DbiCache::Purge | ( | ResultList_t & | subCache, | |
const DbiResult * | res = 0 | |||
) | [private] |
DbiTableProxy& DbiCache::fTableProxy [private] |
const string& DbiCache::fTableName [private] |
std::map<Int_t,ResultList_t> DbiCache::fCache [private] |
Map of sub-caches indexed by aggregate number.
Each sub-cache is a list of owned results for that aggregate.
Definition at line 104 of file DbiCache.h.
UInt_t DbiCache::fCurSize [mutable, private] |
UInt_t DbiCache::fMaxSize [mutable, private] |
UInt_t DbiCache::fNumAdopted [mutable, private] |
UInt_t DbiCache::fNumReused [mutable, private] |