#include <ConnectionPoolManager.h>
Public Methods | |
| ConnectionPoolManager () | |
| Creates a pool that doesn't monitor itself to check for idle/stale connections. More... | |
| virtual | ~ConnectionPoolManager () |
| ConnectionPoolManager (int monitorInterval) | |
| Creates a pool with a monitoring thread that checks the pool to make sure no connections are stale or idle. More... | |
| void | addAlias (const nsAReadableString& alias, const nsAReadableString& driver, const nsAReadableString& url, const nsAReadableString& username, const nsAReadableString& password, int maxConn, int idleTimeout, int checkoutTimeout) |
| Adds an alias to the pool. More... | |
| void | addAlias (const nsAReadableString& alias, const nsAReadableString& driver, const nsAReadableString& url, const nsAReadableString& username, const nsAReadableString& password, int maxConn, int idleTimeout, int checkoutTimeout, int maxCheckout) |
| Adds an alias to the pool. More... | |
| void | removeAlias (const nsAReadableString& alias) |
| Closes all Connections in the pool with the supplied alias. More... | |
| ConnectionPool* | getPool (const nsAReadableString& alias) |
| Returns the pool with the supplied alias. More... | |
| void | run () |
| Monitors each ConnectionPool and makes sure that no connection has gone idle or has been checked out for too long. More... | |
| Connection* | connect (const nsAReadableString& alias) |
| Returns a connection from pool. More... | |
Private Types | |
| typedef std::map<const nsAReadableString*, ConnectionPool*, compareARS> | mapStringPool |
Private Attributes | |
| mapStringPool | m_aliasHash |
| long | m_sleepInterval |
| PRLock* | m_mManager |
|
|
Definition at line 173 of file ConnectionPoolManager.h. |
|
|
Creates a pool that doesn't monitor itself to check for idle/stale connections. Use this constructor only if you know what you're doing and have a good reason to not use the monitor thread. Definition at line 85 of file ConnectionPoolManager.cpp. |
|
|
Definition at line 105 of file ConnectionPoolManager.cpp. |
|
|
Creates a pool with a monitoring thread that checks the pool to make sure no connections are stale or idle.
Definition at line 96 of file ConnectionPoolManager.cpp. |
|
|
Adds an alias to the pool. This does call Class.forName().newInstance() on the JDBC driver, so you don't have to call that yourself. idleTimeout and checkoutTimeout are expressed in seconds
Definition at line 173 of file ConnectionPoolManager.cpp. |
|
|
Adds an alias to the pool. This does call Class.forName().newInstance() on the JDBC driver, so you don't have to call that yourself. idleTimeout and checkoutTimeout are expressed in seconds
Definition at line 137 of file ConnectionPoolManager.cpp. Referenced by px7xpdbc::px7xpdbc(). |
|
|
Returns a connection from pool.
Definition at line 271 of file ConnectionPoolManager.cpp. |
|
|
Returns the pool with the supplied alias.
Definition at line 212 of file ConnectionPoolManager.cpp. Referenced by connect(), px7xpdbc::getConnection(), and removeAlias(). |
|
|
Closes all Connections in the pool with the supplied alias.
Definition at line 198 of file ConnectionPoolManager.cpp. |
|
|
Monitors each ConnectionPool and makes sure that no connection has gone idle or has been checked out for too long.
Definition at line 242 of file ConnectionPoolManager.cpp. |
|
|
Definition at line 174 of file ConnectionPoolManager.h. |
|
|
Definition at line 176 of file ConnectionPoolManager.h. |
|
|
Definition at line 175 of file ConnectionPoolManager.h. |
1.2.1 written by Dimitri van Heesch,
© 1997-2000