Home | Trees | Index | Help |
---|
|
object
--+ |AbstractConnectionPool
--+ | PersistentConnectionPool
A pool that assigns persistent connections to different threads.
Note that this connection pool generates by itself the required keys using the current thread id. This means that untill a thread put away a connection it will always get the same connection object by successive .getconn() calls. This also means that a thread can't use more than one single connection from the pool.
Method Summary | |
---|---|
Initialize the threading lock. | |
Close all connections (even the one currently in use.) | |
Generate thread id and return a connection. | |
Put away an unused connection. | |
Inherited from AbstractConnectionPool | |
Close all connections. | |
Create a new connection and assign it to 'key' if not None. | |
Get a free connection and assign it to 'key' if not None. | |
Return a new unique key. | |
Put away a connection. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
Return repr(x)... | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... |
Method Details |
---|
__init__(self,
minconn,
maxconn,
*args,
**kwargs)
|
closeall(self)Close all connections (even the one currently in use.) |
getconn(self)Generate thread id and return a connection. |
putconn(self, conn=None, close=False)Put away an unused connection. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sat Jan 14 01:42:34 2006 | http://epydoc.sf.net |