Aestate
|
Public Member Functions | |
def | __init__ (self, dbapi, maxconnections, *args, **kwargs) |
Public Attributes | |
connection | |
addConnection | |
returnConnection | |
Static Public Attributes | |
version = __version__ | |
Private Member Functions | |
def | _unthreadsafe_get_connection (self) |
def | _unthreadsafe_add_connection (self, con) |
def | _unthreadsafe_return_connection (self, con) |
def | _threadsafe_get_connection (self) |
def | _threadsafe_add_connection (self, con) |
def | _threadsafe_return_connection (self, con) |
Private Attributes | |
_queue | |
_lock | |
_nextConnection | |
_connections | |
A very simple database connection pool. After you have created the connection pool, you can get connections using getConnection().
Definition at line 113 of file simple_pooled_db.py.
def aestate.opera.DBPool.simple_pooled_db.PooledDB.__init__ | ( | self, | |
dbapi, | |||
maxconnections, | |||
* | args, | ||
** | kwargs | ||
) |
Set up the database connection pool. dbapi: the DB-API 2 compliant module you want to use maxconnections: the number of connections cached in the pool args, kwargs: the parameters that shall be used to establish the database connections using connect()
Definition at line 122 of file simple_pooled_db.py.
|
private |
Add a connection to the pool.
Definition at line 211 of file simple_pooled_db.py.
|
private |
Get a connection from the pool.
Definition at line 197 of file simple_pooled_db.py.
|
private |
Return a connection to the pool. In this case, the connections always stay in the pool, so there is no need to do anything here.
Definition at line 215 of file simple_pooled_db.py.
|
private |
Add a connection to the pool.
Definition at line 178 of file simple_pooled_db.py.
|
private |
Get a connection from the pool.
Definition at line 174 of file simple_pooled_db.py.
|
private |
Return a connection to the pool. In this case, the connections need to be put back into the queue after they have been used. This is done automatically when the connection is closed and should never be called explicitly outside of this module.
Definition at line 182 of file simple_pooled_db.py.
|
private |
Definition at line 156 of file simple_pooled_db.py.
|
private |
Definition at line 154 of file simple_pooled_db.py.
|
private |
Definition at line 155 of file simple_pooled_db.py.
|
private |
Definition at line 145 of file simple_pooled_db.py.
aestate.opera.DBPool.simple_pooled_db.PooledDB.addConnection |
Definition at line 147 of file simple_pooled_db.py.
aestate.opera.DBPool.simple_pooled_db.PooledDB.connection |
Definition at line 146 of file simple_pooled_db.py.
aestate.opera.DBPool.simple_pooled_db.PooledDB.returnConnection |
Definition at line 148 of file simple_pooled_db.py.
|
static |
Definition at line 120 of file simple_pooled_db.py.