Home | Trees | Index | Help |
|
---|
Package aquarium :: Package session :: Module DatabaseSessionContainer :: Class DatabaseSessionContainer |
|
AquariumClass
--+ |SessionContainer
--+ | DatabaseSessionContainer
This is the session container.
I won't bother with any locking. The database can take care of that.
Concerning aquarium.util.AquariumClass: unlike its parent class, this class does mixin aquarium.util.AquariumClass and does require a ctx parameter in its constructor. I need to do this in order to get access to the database connection.
The following class level constants are defined:
Method Summary | |
---|---|
Call AquariumClass.__init__. | |
Delete all of the expired sessions. | |
Create or open a session. | |
This is a session factory method. | |
Does a session with the given sid exist? | |
This is NotImplemented because it's not needed. | |
Load an existing session. | |
Inherited from SessionContainer | |
Adjust all of the lastModified keys. | |
Acquire the global lock. | |
Generate a new sid. | |
Release the global lock. | |
Delete a session permanently. |
Class Variable Summary | |
---|---|
int |
SESSION_CLEANUP_FREQUENCY = 100 |
Inherited from SessionContainer | |
int |
SID_LENGTH = 20 |
lock |
_lock = <thread.lock object at 0xb7df80a0>
|
dict |
_sessions = {}
|
Method Details |
---|
__init__(self,
ctx)
|
cleanup(self)Delete all of the expired sessions. It's the application's responsibility to occasionally call this if you set SESSION_CLEANUP_FREQUENCY to 0. |
open(self, sid=None)Create or open a session. Also, call cleanup per SESSION_CLEANUP_FREQUENCY. |
_createSession(self, sid)This is a session factory method. |
_exists(self, sid)Does a session with the given sid exist? This implies that it is not expired. |
_isExpired(self, sid)This is NotImplemented because it's not needed. If it _exists, then it's not expired. |
_loadSession(self, sid)Load an existing session. |
Class Variable Details |
---|
SESSION_CLEANUP_FREQUENCY
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Jan 1 16:34:19 2007 | http://epydoc.sf.net |