QGIS API Documentation  2.14.0-Essen
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
QgsConnectionPoolGroup< T > Class Template Reference

Template that stores data related to one server. More...

#include <qgsconnectionpool.h>

Classes

struct  Item
 

Public Member Functions

 QgsConnectionPoolGroup (const QString &ci)
 
 ~QgsConnectionPoolGroup ()
 
acquire ()
 
void invalidateConnections ()
 
void release (T conn)
 

Static Public Attributes

static const int maxConcurrentConnections
 

Protected Member Functions

void initTimer (QObject *parent)
 
void onConnectionExpired ()
 

Protected Attributes

QList< T > acquiredConns
 
QString connInfo
 
QMutex connMutex
 
QStack< Itemconns
 
QTimerexpirationTimer
 
QSemaphore sem
 

Detailed Description

template<typename T>
class QgsConnectionPoolGroup< T >

Template that stores data related to one server.

It is assumed that following functions exist:

Because of issues with templates and QObject's signals and slots, this class only provides helper functions for QObject-related functionality - the place which uses the template is resonsible for:

For an example on how to use the template class, have a look at the implementation in postgres/spatialite providers.

Note
not available in Python bindings

Definition at line 54 of file qgsconnectionpool.h.

Constructor & Destructor Documentation

template<typename T >
QgsConnectionPoolGroup< T >::QgsConnectionPoolGroup ( const QString ci)
inline

Definition at line 66 of file qgsconnectionpool.h.

template<typename T >
QgsConnectionPoolGroup< T >::~QgsConnectionPoolGroup ( )
inline

Definition at line 73 of file qgsconnectionpool.h.

Member Function Documentation

template<typename T >
T QgsConnectionPoolGroup< T >::acquire ( )
inline

Definition at line 81 of file qgsconnectionpool.h.

template<typename T >
void QgsConnectionPoolGroup< T >::initTimer ( QObject parent)
inlineprotected

Definition at line 169 of file qgsconnectionpool.h.

template<typename T >
void QgsConnectionPoolGroup< T >::invalidateConnections ( )
inline

Definition at line 154 of file qgsconnectionpool.h.

template<typename T >
void QgsConnectionPoolGroup< T >::onConnectionExpired ( )
inlineprotected

Definition at line 180 of file qgsconnectionpool.h.

template<typename T >
void QgsConnectionPoolGroup< T >::release ( conn)
inline

Definition at line 127 of file qgsconnectionpool.h.

Member Data Documentation

template<typename T >
QList<T> QgsConnectionPoolGroup< T >::acquiredConns
protected

Definition at line 212 of file qgsconnectionpool.h.

template<typename T >
QString QgsConnectionPoolGroup< T >::connInfo
protected

Definition at line 210 of file qgsconnectionpool.h.

template<typename T >
QMutex QgsConnectionPoolGroup< T >::connMutex
protected

Definition at line 213 of file qgsconnectionpool.h.

template<typename T >
QStack<Item> QgsConnectionPoolGroup< T >::conns
protected

Definition at line 211 of file qgsconnectionpool.h.

template<typename T >
QTimer* QgsConnectionPoolGroup< T >::expirationTimer
protected

Definition at line 215 of file qgsconnectionpool.h.

template<typename T >
const int QgsConnectionPoolGroup< T >::maxConcurrentConnections
static

Definition at line 58 of file qgsconnectionpool.h.

template<typename T >
QSemaphore QgsConnectionPoolGroup< T >::sem
protected

Definition at line 214 of file qgsconnectionpool.h.


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