Package gofer :: Package messaging :: Module endpoint :: Class SessionPool
[hide private]
[frames] | no frames]

Class SessionPool

source code

The AMQP session pool.

Instance Methods [hide private]
 
__init__(self) source code
qpid.messaging.Session
get(self, url)
Get the next free session in the pool.
source code
qpid.messaging.Session
put(self, url, ssn)
Release a session back to the pool.
source code
 
purge(self)
Purge (close) free sessions.
source code
qpid.messaging.Session
__pop(self, pool)
Pop the next available session from the free list.
source code
tuple
__pool(self, url)
Obtain the pool for the specified url.
source code
 
__lock(self) source code
 
__unlock(self) source code
Method Details [hide private]

get(self, url)

source code 

Get the next free session in the pool.

Parameters:
  • url (str) - A broker url.
Returns: qpid.messaging.Session
A free session.

put(self, url, ssn)

source code 

Release a session back to the pool.

Parameters:
  • url (str) - A broker url.
  • ssn - An AMQP session.
Returns: qpid.messaging.Session

__pop(self, pool)

source code 

Pop the next available session from the free list. The session is acknowledge to purge it of stale transactions.

Parameters:
  • pool (tuple) - A pool (free,busy).
Returns: qpid.messaging.Session
The popped session

__pool(self, url)

source code 

Obtain the pool for the specified url.

Parameters:
  • url (str) - A broker url.
Returns: tuple
The session pool. (free,busy)