Package restkit :: Module pool :: Class ConnectionPool
[hide private]
[frames] | no frames]

Class ConnectionPool

source code

   object --+    
            |    
PoolInterface --+
                |
               ConnectionPool

Instance Methods [hide private]
 
__init__(self, max_connections=4)
Initialize ConnectionPool :attr max_connections: int, the number of maximum connectioons per _host_port
source code
 
get(self, address)
method used to return a connection from the pool
source code
 
put(self, address, socket)
Put an item back into the pool, when done
source code
 
clear(self, address)
method used to release all connections
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, max_connections=4)
(Constructor)

source code 

Initialize ConnectionPool :attr max_connections: int, the number of maximum connectioons per _host_port

Overrides: object.__init__

get(self, address)

source code 

method used to return a connection from the pool

Overrides: PoolInterface.get
(inherited documentation)

put(self, address, socket)

source code 

Put an item back into the pool, when done

Overrides: PoolInterface.put
(inherited documentation)

clear(self, address)

source code 

method used to release all connections

Overrides: PoolInterface.clear
(inherited documentation)