1 #ifndef _CONNECTION_MANAGER_H 2 #define _CONNECTION_MANAGER_H 13 #include <plugin_api.h> 30 void setError(
const char *,
const char *,
bool);
35 void setMaxReadingRows(
long rows)
37 m_maxReadingRows = rows;
43 std::list<Connection *> idle;
44 std::list<Connection *> inUse;
50 long m_maxReadingRows;
void growPool(unsigned int)
Grow the connection pool by the number of connections specified.
Definition: connection_manager.cpp:59
unsigned int shrinkPool(unsigned int)
Attempt to shrink the number of connections in the idle pool.
Definition: connection_manager.cpp:82
Connection * allocate()
Allocate a connection from the idle pool.
Definition: connection_manager.cpp:110
Singleton class to manage Postgres connection pool.
Definition: connection_manager.h:22
void shutdown()
Called at shutdown.
Definition: connection_manager.cpp:35
static ConnectionManager * getInstance()
Return the singleton instance of the connection manager.
Definition: connection_manager.cpp:44
void release(Connection *)
Release a connection back to the idle pool for reallocation.
Definition: connection_manager.cpp:142
void setError(const char *, const char *, bool)
Set the last error information for a plugin.
Definition: connection_manager.cpp:159
Definition: connection.h:32
Structure used by plugins to return error information.
Definition: plugin_api.h:44