MythTV
master
|
DB connection pool, used by MSqlQuery. Do not use directly. More...
#include <mythdbcon.h>
Public Member Functions | |
MDBManager (void)=default | |
~MDBManager (void) | |
void | CloseDatabases (void) |
void | PurgeIdleConnections (bool leaveOne=false) |
Protected Member Functions | |
MSqlDatabase * | popConnection (bool reuse) |
void | pushConnection (MSqlDatabase *db) |
MSqlDatabase * | getSchedCon (void) |
MSqlDatabase * | getChannelCon (void) |
Private Types | |
using | DBList = QList< MSqlDatabase * > |
Private Member Functions | |
MSqlDatabase * | getStaticCon (MSqlDatabase **dbcon, const QString &name) |
Private Attributes | |
QMutex | m_lock |
QHash< QThread *, DBList > | m_pool |
QHash< QThread *, MSqlDatabase * > | m_inuse |
QHash< QThread *, int > | m_inuseCount |
int | m_nextConnID {0} |
int | m_connCount {0} |
MSqlDatabase * | m_schedCon {nullptr} |
MSqlDatabase * | m_channelCon {nullptr} |
QHash< QThread *, DBList > | m_staticPool |
Friends | |
class | MSqlQuery |
DB connection pool, used by MSqlQuery. Do not use directly.
Definition at line 55 of file mythdbcon.h.
|
private |
Definition at line 77 of file mythdbcon.h.
|
default |
MDBManager::~MDBManager | ( | void | ) |
Definition at line 291 of file mythdbcon.cpp.
void MDBManager::CloseDatabases | ( | void | ) |
Definition at line 482 of file mythdbcon.cpp.
Referenced by MythContextPrivate::ResetDatabase(), and ~MDBManager().
Definition at line 387 of file mythdbcon.cpp.
Referenced by popConnection(), and pushConnection().
|
protected |
Definition at line 307 of file mythdbcon.cpp.
|
protected |
Definition at line 359 of file mythdbcon.cpp.
Referenced by MSqlQuery::~MSqlQuery().
|
protected |
Definition at line 472 of file mythdbcon.cpp.
|
protected |
Definition at line 477 of file mythdbcon.cpp.
|
private |
Definition at line 453 of file mythdbcon.cpp.
Referenced by getChannelCon(), and getSchedCon().
|
friend |
Definition at line 57 of file mythdbcon.h.
|
private |
Definition at line 76 of file mythdbcon.h.
Referenced by CloseDatabases(), popConnection(), PurgeIdleConnections(), and pushConnection().
|
private |
Definition at line 78 of file mythdbcon.h.
Referenced by CloseDatabases(), popConnection(), PurgeIdleConnections(), and pushConnection().
|
private |
Definition at line 80 of file mythdbcon.h.
Referenced by popConnection(), and pushConnection().
|
private |
Definition at line 81 of file mythdbcon.h.
Referenced by popConnection(), and pushConnection().
|
private |
Definition at line 84 of file mythdbcon.h.
Referenced by popConnection(), and PurgeIdleConnections().
|
private |
Definition at line 85 of file mythdbcon.h.
Referenced by CloseDatabases(), popConnection(), PurgeIdleConnections(), and ~MDBManager().
|
private |
Definition at line 87 of file mythdbcon.h.
Referenced by CloseDatabases(), getSchedCon(), and ~MDBManager().
|
private |
Definition at line 88 of file mythdbcon.h.
Referenced by CloseDatabases(), getChannelCon(), and ~MDBManager().
|
private |
Definition at line 89 of file mythdbcon.h.
Referenced by CloseDatabases(), and getStaticCon().