MDBManager Class Reference

DB connection pool, used by MSqlQuery. Do not use directly. More...

#include <mythdbcon.h>

List of all members.

Public Member Functions

 MDBManager (void)
 ~MDBManager (void)
void CloseDatabases (void)
void PurgeIdleConnections (bool leaveOne=false)

Protected Member Functions

MSqlDatabasepopConnection (bool reuse)
void pushConnection (MSqlDatabase *db)
MSqlDatabasegetSchedCon (void)
MSqlDatabasegetDDCon (void)

Private Types

typedef QList< MSqlDatabase * > DBList

Private Member Functions

MSqlDatabasegetStaticCon (MSqlDatabase **dbcon, QString name)

Private Attributes

QMutex m_lock
QHash< QThread *, DBListm_pool
QHash< QThread *, MSqlDatabase * > m_inuse
QHash< QThread *, int > m_inuse_count
int m_nextConnID
int m_connCount
MSqlDatabasem_schedCon
MSqlDatabasem_DDCon
QHash< QThread *, DBListm_static_pool

Friends

class MSqlQuery

Detailed Description

DB connection pool, used by MSqlQuery. Do not use directly.

Definition at line 52 of file mythdbcon.h.


Member Typedef Documentation

typedef QList<MSqlDatabase*> MDBManager::DBList [private]

Definition at line 73 of file mythdbcon.h.


Constructor & Destructor Documentation

MDBManager::MDBManager ( void   ) 

Definition at line 246 of file mythdbcon.cpp.

MDBManager::~MDBManager ( void   ) 

Definition at line 255 of file mythdbcon.cpp.


Member Function Documentation

void MDBManager::CloseDatabases ( void   ) 
void MDBManager::PurgeIdleConnections ( bool  leaveOne = false  ) 
MSqlDatabase * MDBManager::popConnection ( bool  reuse  )  [protected]

Definition at line 271 of file mythdbcon.cpp.

Referenced by MSqlQuery::InitCon(), and MSqlQuery::testDBConnection().

void MDBManager::pushConnection ( MSqlDatabase db  )  [protected]
MSqlDatabase * MDBManager::getSchedCon ( void   )  [protected]

Definition at line 433 of file mythdbcon.cpp.

Referenced by MSqlQuery::SchedCon().

MSqlDatabase * MDBManager::getDDCon ( void   )  [protected]

Definition at line 438 of file mythdbcon.cpp.

Referenced by MSqlQuery::DDCon().

MSqlDatabase * MDBManager::getStaticCon ( MSqlDatabase **  dbcon,
QString  name 
) [private]

Definition at line 414 of file mythdbcon.cpp.

Referenced by getDDCon(), and getSchedCon().


Friends And Related Function Documentation

friend class MSqlQuery [friend]

Definition at line 54 of file mythdbcon.h.


Member Data Documentation

QMutex MDBManager::m_lock [private]

Definition at line 72 of file mythdbcon.h.

Referenced by CloseDatabases(), popConnection(), PurgeIdleConnections(), and pushConnection().

QHash<QThread*, DBList> MDBManager::m_pool [private]

Definition at line 74 of file mythdbcon.h.

Referenced by CloseDatabases(), popConnection(), PurgeIdleConnections(), and pushConnection().

QHash<QThread*, MSqlDatabase*> MDBManager::m_inuse [private]

Definition at line 76 of file mythdbcon.h.

Referenced by popConnection(), and pushConnection().

QHash<QThread*, int> MDBManager::m_inuse_count [private]

Definition at line 77 of file mythdbcon.h.

Referenced by popConnection(), and pushConnection().

int MDBManager::m_nextConnID [private]

Definition at line 80 of file mythdbcon.h.

Referenced by MDBManager(), popConnection(), and PurgeIdleConnections().

int MDBManager::m_connCount [private]

Definition at line 83 of file mythdbcon.h.

Referenced by CloseDatabases(), getSchedCon(), MDBManager(), and ~MDBManager().

Definition at line 84 of file mythdbcon.h.

Referenced by CloseDatabases(), getDDCon(), MDBManager(), and ~MDBManager().

QHash<QThread*, DBList> MDBManager::m_static_pool [private]

Definition at line 85 of file mythdbcon.h.

Referenced by CloseDatabases(), and getStaticCon().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri Feb 10 06:42:04 2012 for MythTV by  doxygen 1.6.3