Package twisted :: Package enterprise :: Module adbapi :: Class ConnectionPool

[show private | hide private]
[frames | no frames]

## Class ConnectionPool

    Jellyable --+
                |
     Serializable --+
                    |
        Referenceable --+
                        |
                       ConnectionPool

I represent a pool of connections to a DB-API 2.0 compliant database.

You can pass keywords args cp_min and cp_max that will specify the size of the thread pool used to serve database requests (possibly this is deprecated - it does not work at the moment in any case).

Method Summary
| ``__init__`(self, dbapiName, *connargs, **connkw)` See ConnectionPool.__doc__
| `__getstate__(self)`
| `__setstate__(self, state)`
| `close(self)`
| `connect(self)`
| `finalClose(self)`
| `getStateFor(self, jellier)` (inherited from `Jellyable`)
| ``interaction`(self, interaction, callback, errback, *args, **kw)` Interact with the database.
| ``jellyFor`(self, jellier)` (internal) (inherited from `Referenceable`)
| `operation(self, callback, errback, *args, **kw)`
| ``processUniqueID`(self)` Return an ID which uniquely represents this object for this process. (inherited from `Serializable`)
| `query(self, callback, errback, *args, **kw)`
| ``remoteMessageReceived`(self, broker, message, args, kw)` A remote message has been received. (inherited from `Referenceable`)
| `runInteraction(self, interaction, *args, **kw)`
| `runOperation(self, *args, **kw)`
| `synchronousOperation(self, *args, **kw)`

Class Variable Summary
`int` | `noisy`

Method Details

### __init__(self, dbapiName, *connargs, **connkw)
(Constructor)

See ConnectionPool.__doc__

### interaction(self, interaction, callback, errback, *args, **kw)

    Interact with the database.

    The callable object presented here will be executed in a pooled thread.
    'callback' will be made in the main thread upon success and 'errback'
    will be called upon failure.  If 'callback' is called, that means that
    the transaction was committed; if 'errback', it was rolled back.  This
    does not apply in databases which do not support transactions.

    @param interaction: a callable object whose first argument is
        L{adbapi.Transaction}.
    @param *args,**kw: additional arguments to be passed to 'interaction'

Class Variable Details

### noisy

  Type:
    `int`
  Value:

        1

Generated by Epydoc 1.1 on Thu May 8 13:16:24 2003 | http://epydoc.sf.net