EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbCache Class Reference

#include <EicRoot/blob/master/dbase/dbInterface/FairDbCache.h>

+ Collaboration diagram for FairDbCache:

Public Types

typedef std::list< FairDbResult * > ResultList_t
 

Public Member Functions

 FairDbCache (FairDbTableProxy &qp, const string &tableName)
 
virtual ~FairDbCache ()
 
UInt_t GetMaxSize () const
 
UInt_t GetCurSize () const
 
UInt_t GetNumAdopted () const
 
UInt_t GetNumReused () const
 
const FairDbResultSearch (const ValContext &vc, const FairDb::Task &task) const
 Primary searches.
 
const FairDbResultSearch (const string &sqlQualifiers) const
 
const FairDbResultSearch (const FairDbValidityRec &vr, const string &sqlQualifiers="") const
 Secondary search.
 
void Adopt (FairDbResult *res, bool registerKey=true)
 
void Purge ()
 
void SetStale ()
 

Private Member Functions

 FairDbCache (const FairDbCache &)
 
FairDbCacheoperator= (const FairDbCache &)
 
const ResultList_tGetSubCache (Int_t aggNo) const
 
void Purge (ResultList_t &subCache, const FairDbResult *res=0)
 

Private Attributes

FairDbTableProxyfTableProxy
 
const string & fTableName
 
std::map< Int_t, ResultList_tfCache
 
UInt_t fCurSize
 
UInt_t fMaxSize
 
UInt_t fNumAdopted
 
UInt_t fNumReused
 

Detailed Description

Definition at line 18 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 18 of file FairDbCache.h

Member Typedef Documentation

Definition at line 25 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 25 of file FairDbCache.h

Constructor & Destructor Documentation

FairDbCache::FairDbCache ( FairDbTableProxy qp,
const string &  tableName 
)

Definition at line 18 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 18 of file FairDbCache.cxx

FairDbCache::~FairDbCache ( )
virtual

Definition at line 32 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 32 of file FairDbCache.cxx

References fCache, GetSubCache(), and Purge().

+ Here is the call graph for this function:

FairDbCache::FairDbCache ( const FairDbCache )
private

Member Function Documentation

void FairDbCache::Adopt ( FairDbResult res,
bool  registerKey = true 
)

Definition at line 51 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 51 of file FairDbCache.cxx

References fCache, fCurSize, fMaxSize, fNumAdopted, FairDbValidityRec::GetAggregateNo(), FairDbResult::GetKey(), GetSubCache(), FairDbResult::GetValidityRec(), FairDbResult::GetValidityRecGlobal(), Purge(), FairDbResult::RegisterKey(), and FairDbResult::TableName().

Referenced by FairDbTableProxy::Query(), and FairDbTableProxy::RestoreFromL2Cache().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt_t FairDbCache::GetCurSize ( ) const
inline

Definition at line 36 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 36 of file FairDbCache.h

References fCurSize.

UInt_t FairDbCache::GetMaxSize ( ) const
inline

Definition at line 35 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 35 of file FairDbCache.h

References fMaxSize.

UInt_t FairDbCache::GetNumAdopted ( ) const
inline

Definition at line 37 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 37 of file FairDbCache.h

References fNumAdopted.

UInt_t FairDbCache::GetNumReused ( ) const
inline

Definition at line 38 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 38 of file FairDbCache.h

References fNumReused.

const ResultList_t * FairDbCache::GetSubCache ( Int_t  aggNo) const
private

Definition at line 81 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 81 of file FairDbCache.cxx

References ConstCacheItr_t, and fCache.

Referenced by Adopt(), Search(), and ~FairDbCache().

+ Here is the caller graph for this function:

FairDbCache& FairDbCache::operator= ( const FairDbCache )
private
void FairDbCache::Purge ( )

Definition at line 88 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 88 of file FairDbCache.cxx

References fCache.

Referenced by Adopt(), FairDbTableProxyRegistry::PurgeCaches(), and ~FairDbCache().

+ Here is the caller graph for this function:

void FairDbCache::Purge ( ResultList_t subCache,
const FairDbResult res = 0 
)
private

Definition at line 96 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 96 of file FairDbCache.cxx

References FairDbResult::CanDelete(), fCurSize, FairDbResult::GetNumClients(), FairDbResult::GetValidityRec(), and FairDbResult::TableName().

+ Here is the call graph for this function:

const FairDbResult * FairDbCache::Search ( const ValContext vc,
const FairDb::Task task 
) const

Primary searches.

Definition at line 155 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 155 of file FairDbCache.cxx

References SimFlag::AsString(), fNumReused, fTableName, FairDbSimFlagAssociation::Get(), ValContext::GetDetector(), FairDbResult::GetNumAggregates(), FairDbResult::GetNumRows(), ValContext::GetSimFlag(), GetSubCache(), ValContext::GetTimeStamp(), FairDbSimFlagAssociation::Instance(), and FairDbResult::Satisfies().

Referenced by FairDbTableProxy::Query(), and FairDbTableProxy::RestoreFromL2Cache().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const FairDbResult * FairDbCache::Search ( const string &  sqlQualifiers) const

Definition at line 205 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 205 of file FairDbCache.cxx

References fNumReused, fTableName, FairDbResult::GetNumAggregates(), FairDbResult::GetNumRows(), GetSubCache(), and FairDbResult::Satisfies().

+ Here is the call graph for this function:

const FairDbResult * FairDbCache::Search ( const FairDbValidityRec vr,
const string &  sqlQualifiers = "" 
) const

Secondary search.

Definition at line 122 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 122 of file FairDbCache.cxx

References fNumReused, fTableName, FairDbValidityRec::GetAggregateNo(), FairDbResult::GetNumAggregates(), FairDbResult::GetNumRows(), GetSubCache(), and FairDbResult::Satisfies().

+ Here is the call graph for this function:

void FairDbCache::SetStale ( )

Definition at line 230 of file FairDbCache.cxx.

View newest version in sPHENIX GitHub at line 230 of file FairDbCache.cxx

References fCache.

Member Data Documentation

std::map<Int_t,ResultList_t> FairDbCache::fCache
private

Definition at line 70 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 70 of file FairDbCache.h

Referenced by Adopt(), GetSubCache(), Purge(), SetStale(), and ~FairDbCache().

UInt_t FairDbCache::fCurSize
mutableprivate

Definition at line 71 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 71 of file FairDbCache.h

Referenced by Adopt(), GetCurSize(), and Purge().

UInt_t FairDbCache::fMaxSize
mutableprivate

Definition at line 72 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 72 of file FairDbCache.h

Referenced by Adopt(), and GetMaxSize().

UInt_t FairDbCache::fNumAdopted
mutableprivate

Definition at line 73 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 73 of file FairDbCache.h

Referenced by Adopt(), and GetNumAdopted().

UInt_t FairDbCache::fNumReused
mutableprivate

Definition at line 74 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 74 of file FairDbCache.h

Referenced by GetNumReused(), and Search().

const string& FairDbCache::fTableName
private

Definition at line 69 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 69 of file FairDbCache.h

Referenced by Search().

FairDbTableProxy& FairDbCache::fTableProxy
private

Definition at line 67 of file FairDbCache.h.

View newest version in sPHENIX GitHub at line 67 of file FairDbCache.h


The documentation for this class was generated from the following files: