X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=psycopg2%2Fdoc%2Fapi%2Fprivate%2Fpsycopg2.pool.AbstractConnectionPool-class.html;fp=psycopg2%2Fdoc%2Fapi%2Fprivate%2Fpsycopg2.pool.AbstractConnectionPool-class.html;h=be79964af18e93960df4de15cf06faddb47d3c50;hb=e5bdc26e1423689c0ab3204931335787737946ea;hp=0000000000000000000000000000000000000000;hpb=f8dd312990da7cc744e1c148bfd395c18492f3f1;p=plcapi.git diff --git a/psycopg2/doc/api/private/psycopg2.pool.AbstractConnectionPool-class.html b/psycopg2/doc/api/private/psycopg2.pool.AbstractConnectionPool-class.html new file mode 100644 index 0000000..be79964 --- /dev/null +++ b/psycopg2/doc/api/private/psycopg2.pool.AbstractConnectionPool-class.html @@ -0,0 +1,247 @@ + + + + + psycopg2.pool.AbstractConnectionPool + + + + + + + + + + + + + + + + + + + +
+ + Package psycopg2 :: + Module pool :: + Class AbstractConnectionPool +
+
+ + +
[show private | hide private]
[frames | no frames]
+ + +

Type AbstractConnectionPool

+ +
+object --+
+         |
+        AbstractConnectionPool
+

+ +
Known Subclasses:
+
+ PersistentConnectionPool, + SimpleConnectionPool, + ThreadedConnectionPool
+ +
+ +

Generic key-based pooling code.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
 __init__(self, + minconn, + maxconn, + *args, + **kwargs) +
+Initialize the connection pool.
 _closeall(self) +
+Close all connections.
 _connect(self, + key) +
+Create a new connection and assign it to 'key' if not None.
 _getconn(self, + key) +
+Get a free connection and assign it to 'key' if not None.
 _getkey(self) +
+Return a new unique key.
 _putconn(self, + conn, + key, + close) +
+Put away a connection.
    Inherited from object
 __delattr__(...) +
+x.__delattr__('name') <==> del x.name
 __getattribute__(...) +
+x.__getattribute__('name') <==> x.name
 __hash__(x) +
+Return hash(x)...
 __new__(T, + S, + ...) +
+Return a new object with type S, a subtype of T...
 __reduce__(...) +
+helper for pickle
 __reduce_ex__(...) +
+helper for pickle
 __repr__(x) +
+Return repr(x)...
 __setattr__(...) +
+x.__setattr__('name', value) <==> x.name = value
 __str__(x) +
+Return str(x)...

+ + + + + + +
Method Details
+ + +
+

__init__(self, + minconn, + maxconn, + *args, + **kwargs) +
(Constructor) +

+

Initialize the connection pool.

+

New 'minconn' connections are created immediately calling 'connfunc' +with given parameters. The connection pool will support a maximum of +about 'maxconn' connections.

+
+
Overrides:
+
__builtin__.object.__init__
+
+
+
+ + +
+

_closeall(self) +

+

Close all connections.

+

Note that this can lead to some code fail badly when trying to use +an already closed connection. If you call .closeall() make sure +your code can deal with it.

+
+
+
+ + +
+

_connect(self, + key=None) +

+

Create a new connection and assign it to 'key' if not None.

+
+
+
+ + +
+

_getconn(self, + key=None) +

+

Get a free connection and assign it to 'key' if not None.

+
+
+
+ + +
+

_getkey(self) +

+

Return a new unique key.

+
+
+
+ + +
+

_putconn(self, + conn, + key=None, + close=False) +

+

Put away a connection.

+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ +