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 m_channelMap
 
QMutex m_eventMapLock
 
uint m_lastPruneTime
 
uint m_accessCnt {0}
 
uint m_hitCnt {0}
 
uint m_tblChgCnt {0}
 
uint m_verChgCnt {0}
 
uint m_endChgCnt {0}
 
uint m_entryCnt {0}
 
uint m_pruneCnt {0}
 
uint m_prunedHitCnt {0}
 
uint m_futureHitCnt {0}
 
uint m_wrongChannelHitCnt {0}
 

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 31 of file eitcache.cpp.

Member Function Documentation

◆ IsNewEIT()

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

Definition at line 337 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 414 of file eitcache.cpp.

Referenced by EITHelper::PruneEITCache().

◆ WriteToDB()

void EITCache::WriteToDB ( void  )

Definition at line 308 of file eitcache.cpp.

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

◆ ResetStatistics()

void EITCache::ResetStatistics ( void  )

Definition at line 36 of file eitcache.cpp.

◆ GetStatistics()

QString EITCache::GetStatistics ( void  ) const

Definition at line 50 of file eitcache.cpp.

Referenced by IsNewEIT().

◆ LoadChannel()

event_map_t * EITCache::LoadChannel ( uint  chanid)
private

Definition at line 217 of file eitcache.cpp.

Referenced by IsNewEIT().

◆ WriteChannelToDB()

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

Definition at line 262 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 443 of file eitcache.cpp.

Referenced by run_backend().

Member Data Documentation

◆ m_channelMap

key_map_t EITCache::m_channelMap
private

Definition at line 42 of file eitcache.h.

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

◆ m_eventMapLock

QMutex EITCache::m_eventMapLock
mutableprivate

Definition at line 44 of file eitcache.h.

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

◆ m_lastPruneTime

uint EITCache::m_lastPruneTime
private

Definition at line 45 of file eitcache.h.

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

◆ m_accessCnt

uint EITCache::m_accessCnt {0}
private

Definition at line 48 of file eitcache.h.

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

◆ m_hitCnt

uint EITCache::m_hitCnt {0}
private

Definition at line 49 of file eitcache.h.

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

◆ m_tblChgCnt

uint EITCache::m_tblChgCnt {0}
private

Definition at line 50 of file eitcache.h.

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

◆ m_verChgCnt

uint EITCache::m_verChgCnt {0}
private

Definition at line 51 of file eitcache.h.

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

◆ m_endChgCnt

uint EITCache::m_endChgCnt {0}
private

Definition at line 52 of file eitcache.h.

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

◆ m_entryCnt

uint EITCache::m_entryCnt {0}
private

Definition at line 53 of file eitcache.h.

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

◆ m_pruneCnt

uint EITCache::m_pruneCnt {0}
private

Definition at line 54 of file eitcache.h.

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

◆ m_prunedHitCnt

uint EITCache::m_prunedHitCnt {0}
private

Definition at line 55 of file eitcache.h.

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

◆ m_futureHitCnt

uint EITCache::m_futureHitCnt {0}
private

Definition at line 56 of file eitcache.h.

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

◆ m_wrongChannelHitCnt

uint EITCache::m_wrongChannelHitCnt {0}
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: