Package restkit :: Package conn :: Module base :: Class Pool
[hide private]
[frames] | no frames]

Class Pool

source code

object --+
         |
        Pool
Known Subclasses:

Connection pull for a given route

Instance Methods [hide private]
 
__init__(self, conn_manageer, route, timeout=300, nb_connections=10)
constructor for the pool
source code
 
requet(self)
return a free connection
source code
 
release(self, conn, duration=300)
release a connection in the pool, and make it available for duration.
source code
 
clean_iddle_duration(self)
close any connections that haven been used in fixed duration
source code
 
shutdown(self)
close all connections in the pool
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, conn_manageer, route, timeout=300, nb_connections=10)
(Constructor)

source code 

constructor for the pool

:attr conn_manager: instance of ConnectionManager :attr route: tupple (address, is_ssl, filters, ssl_args) where address is a tuple of (host, port) and ssl_args a dict containing ssl arguments :attr timeout: integer, default timeout :attr nb_connections: integeger, number of connections in the pool

Overrides: object.__init__