template<typename T, typename T_Group>
class QgsConnectionPool< T, T_Group >
Template class responsible for keeping a pool of open connections.
This is desired to avoid the overhead of creation of new connection everytime.
The methods are thread safe.
The connection pool has a limit on maximum number of concurrent connections (per server), once the limit is reached, the acquireConnection() function will block. All connections that have been acquired must be then released with releaseConnection() function.
When the connections are not used for some time, they will get closed automatically to save resources.
- not available in Python bindings
Definition at line 235 of file qgsconnectionpool.h.
template<typename T , typename T_Group >
Invalidates all connections to the specified resource.
The internal state of certain handles (for instance OGR) are altered when a dataset is modified. Consquently, all open handles need to be invalidated when such datasets are changed to ensure the handles are refreshed. See the OGR provider for an example where this is needed.
Definition at line 285 of file qgsconnectionpool.h.