MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
EITCache Class Reference

#include <eitcache.h>

Public Member Functions

 EITCache ()
 
 ~EITCache ()
 
bool IsNewEIT (uint chanid, uint tableid, uint version, uint eventid, uint endtime)
 
uint PruneOldEntries (uint utc_timestamp)
 Prunes entries that describe events ending before timestamp time. More...
 
void WriteToDB (void)
 
void ResetStatistics (void)
 
QString GetStatistics (void) const
 

Static Public Member Functions

static MTV_PUBLIC void ClearChannelLocks (void)
 removes old channel locks, use it only at master b<ackend start More...
 

Private Member Functions

event_map_tLoadChannel (uint chanid)
 
bool WriteChannelToDB (QStringList &value_clauses, uint chanid)
 

Private Attributes

key_map_t channelMap
 
QMutex eventMapLock
 
uint lastPruneTime
 
uint accessCnt
 
uint hitCnt
 
uint tblChgCnt
 
uint verChgCnt
 
uint endChgCnt
 
uint entryCnt
 
uint pruneCnt
 
uint prunedHitCnt
 
uint futureHitCnt
 
uint wrongChannelHitCnt
 

Static Private Attributes

static const uint kVersionMax = 31
 

Detailed Description

Definition at line 22 of file eitcache.h.

Constructor & Destructor Documentation

◆ EITCache()

EITCache::EITCache ( )

Definition at line 21 of file eitcache.cpp.

◆ ~EITCache()

EITCache::~EITCache ( )

Definition at line 33 of file eitcache.cpp.

Member Function Documentation

◆ IsNewEIT()

bool EITCache::IsNewEIT ( uint  chanid,
uint  tableid,
uint  version,
uint  eventid,
uint  endtime 
)

Definition at line 344 of file eitcache.cpp.

Referenced by EITHelper::AddEIT().

◆ PruneOldEntries()

uint EITCache::PruneOldEntries ( uint  timestamp)

Prunes entries that describe events ending before timestamp time.

Returns
number of entries pruned

Definition at line 421 of file eitcache.cpp.

Referenced by EITHelper::PruneEITCache().

◆ WriteToDB()

void EITCache::WriteToDB ( void  )

Definition at line 315 of file eitcache.cpp.

Referenced by IsNewEIT(), PruneOldEntries(), EITHelper::WriteEITCache(), and ~EITCache().

◆ ResetStatistics()

void EITCache::ResetStatistics ( void  )

Definition at line 38 of file eitcache.cpp.

◆ GetStatistics()

QString EITCache::GetStatistics ( void  ) const

Definition at line 52 of file eitcache.cpp.

Referenced by IsNewEIT().

◆ LoadChannel()

event_map_t * EITCache::LoadChannel ( uint  chanid)
private

Definition at line 224 of file eitcache.cpp.

Referenced by IsNewEIT().

◆ WriteChannelToDB()

bool EITCache::WriteChannelToDB ( QStringList &  value_clauses,
uint  chanid 
)
private

Definition at line 269 of file eitcache.cpp.

Referenced by WriteToDB().

◆ ClearChannelLocks()

void EITCache::ClearChannelLocks ( void  )
static

removes old channel locks, use it only at master b<ackend start

Definition at line 450 of file eitcache.cpp.

Member Data Documentation

◆ channelMap

key_map_t EITCache::channelMap
private

Definition at line 42 of file eitcache.h.

Referenced by IsNewEIT(), WriteChannelToDB(), and WriteToDB().

◆ eventMapLock

QMutex EITCache::eventMapLock
mutableprivate

Definition at line 44 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and WriteToDB().

◆ lastPruneTime

uint EITCache::lastPruneTime
private

Definition at line 45 of file eitcache.h.

Referenced by EITCache(), IsNewEIT(), LoadChannel(), PruneOldEntries(), and WriteChannelToDB().

◆ accessCnt

uint EITCache::accessCnt
private

Definition at line 48 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ hitCnt

uint EITCache::hitCnt
private

Definition at line 49 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ tblChgCnt

uint EITCache::tblChgCnt
private

Definition at line 50 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ verChgCnt

uint EITCache::verChgCnt
private

Definition at line 51 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ endChgCnt

uint EITCache::endChgCnt
private

Definition at line 52 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ entryCnt

uint EITCache::entryCnt
private

Definition at line 53 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), LoadChannel(), and ResetStatistics().

◆ pruneCnt

uint EITCache::pruneCnt
private

Definition at line 54 of file eitcache.h.

Referenced by GetStatistics(), ResetStatistics(), and WriteChannelToDB().

◆ prunedHitCnt

uint EITCache::prunedHitCnt
private

Definition at line 55 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ futureHitCnt

uint EITCache::futureHitCnt
private

Definition at line 56 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ wrongChannelHitCnt

uint EITCache::wrongChannelHitCnt
private

Definition at line 57 of file eitcache.h.

Referenced by GetStatistics(), IsNewEIT(), and ResetStatistics().

◆ kVersionMax

const uint EITCache::kVersionMax = 31
staticprivate

Definition at line 59 of file eitcache.h.

Referenced by IsNewEIT().


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