|
QGIS API Documentation
3.0.2-Girona (307d082)
|
Template that stores data related to one server. More...
#include <qgsconnectionpool.h>
Classes | |
| struct | Item |
Public Member Functions | |
| QgsConnectionPoolGroup (const QString &ci) | |
| QgsConnectionPoolGroup (const QgsConnectionPoolGroup &other)=delete | |
| QgsConnectionPoolGroup cannot be copied. More... | |
| ~QgsConnectionPoolGroup () | |
| T | acquire (int timeout) |
| Try to acquire a connection for a maximum of timeout milliseconds. More... | |
| void | invalidateConnections () |
| QgsConnectionPoolGroup & | operator= (const QgsConnectionPoolGroup &other)=delete |
| QgsConnectionPoolGroup cannot be copied. More... | |
| void | release (T conn) |
Static Public Attributes | |
| static const int | MAX_CONCURRENT_CONNECTIONS |
Protected Member Functions | |
| void | initTimer (QObject *parent) |
| void | onConnectionExpired () |
Protected Attributes | |
| QList< T > | acquiredConns |
| QString | connInfo |
| QMutex | connMutex |
| QStack< Item > | conns |
| QTimer * | expirationTimer = nullptr |
| QSemaphore | sem |
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.
Definition at line 57 of file qgsconnectionpool.h.
|
inline |
Definition at line 69 of file qgsconnectionpool.h.
|
inline |
Definition at line 75 of file qgsconnectionpool.h.
|
delete |
QgsConnectionPoolGroup cannot be copied.
|
inline |
Try to acquire a connection for a maximum of timeout milliseconds.
If timeout is a negative value the calling thread will be blocked until a connection becomes available. This is the default behavior.
Definition at line 95 of file qgsconnectionpool.h.
|
inlineprotected |
Definition at line 195 of file qgsconnectionpool.h.
|
inline |
Definition at line 180 of file qgsconnectionpool.h.
|
inlineprotected |
Definition at line 206 of file qgsconnectionpool.h.
|
delete |
QgsConnectionPoolGroup cannot be copied.
|
inline |
Definition at line 153 of file qgsconnectionpool.h.
|
protected |
Definition at line 238 of file qgsconnectionpool.h.
|
protected |
Definition at line 236 of file qgsconnectionpool.h.
|
protected |
Definition at line 239 of file qgsconnectionpool.h.
|
protected |
Definition at line 237 of file qgsconnectionpool.h.
|
protected |
Definition at line 241 of file qgsconnectionpool.h.
|
static |
Definition at line 61 of file qgsconnectionpool.h.
|
protected |
Definition at line 240 of file qgsconnectionpool.h.
1.8.13