Package restkit :: Package manager :: Module base :: Class Manager
[hide private]
[frames] | no frames]

Class Manager

source code

object --+
         |
        Manager
Known Subclasses:

Connection mager, it keeps a pool of opened connections and reap them after a delay if reap_connection is True. By default a thread is used to reap connections, but it can be replaced with signaling if needed. In this case a signal will be send to the manager after a delay. Be aware that using signaling isn't thread-safe and works only on UNIX or UNIX like.

Instance Methods [hide private]
 
__init__(self, max_conn=10, timeout=150, reap_connections=True, with_signaling=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_lock(self) source code
 
murder_connections(self, *args) source code
 
close_connections(self) source code
 
start(self) source code
 
all_connections_count(self)
return all counts per address registered.
source code
 
connection_count(self, addr, ssl)
get connections count for an address
source code
 
find_socket(self, addr, ssl=False)
find a socket from a its address in the pool and return if there is one available, else, return None
source code
 
store_socket(self, sck, addr, ssl=False)
store a socket in the pool to reuse it across threads
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_conn=10, timeout=150, reap_connections=True, with_signaling=False)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)