root/software/session2/trunk/epydoc-html/session2.store.MemorySessionStore.MemorySessionStore-class.html

Revision 12, 14.2 kB (checked in by t, 12 years ago)

Moved VolatileSessionStore? over to MemorySessionStore? (MO)

Line 
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3           "DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6   <title>session2.store.MemorySessionStore.MemorySessionStore</title>
7   <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
8 </head>
9 <body bgcolor="white" text="black" link="blue" vlink="#204080"
10       alink="#204080">
11
12 <!-- =========== START OF NAVBAR =========== -->
13 <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
14   <tr valign="center">
15     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="session2-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
16     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
17     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
18     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
19     <th class="navbar" align="right" width="100%">
20       <table border="0" cellpadding="0" cellspacing="0">
21       <tr><th class="navbar" align="center">
22         <p class="nomargin">
23           session2
24       </p></th></tr></table>
25     </th>
26   </tr>
27 </table>
28 <table width="100%" cellpadding="0" cellspacing="0">
29   <tr valign="top">
30     <td width="100%">
31       <font size="-1"><b class="breadcrumbs">
32         <a href="session2-module.html">Package&nbsp;session2</a> ::
33         <a href="session2.store-module.html">Package&nbsp;store</a> ::
34         <a href="session2.store.MemorySessionStore-module.html">Module&nbsp;MemorySessionStore</a> ::
35         Class&nbsp;MemorySessionStore
36       </b></font></br>
37     </td>
38     <td><table cellpadding="0" cellspacing="0">
39       <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="session2.store.MemorySessionStore.MemorySessionStore-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
40     </table></td>
41 </tr></table>
42
43 <!-- =========== START OF CLASS DESCRIPTION =========== -->
44 <h2 class="class">Class MemorySessionStore</h2>
45
46 <pre class="base-tree">
47 <a href="session2.store.SessionStore.SessionStore-class.html"><code>SessionStore</code></a> --+
48                |
49               <b>MemorySessionStore</b>
50 </pre><br />
51
52 <hr/>
53
54 <pre class="literalblock">
55 Non-persistent memory session storage, useful only for debugging.
56 DO NOT USE WITH MULTIPROCESS SERVERS (e.g., Quixote's SCGI server)!
57 </pre>
58 <hr/>
59
60
61 <!-- =========== START OF METHOD SUMMARY =========== -->
62 <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
63 <tr bgcolor="#70b0f0" class="summary">
64   <th colspan="2">Method Summary</th></tr>
65 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
66   <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>)</span></code>
67 </td></tr>
68 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
69   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#delete_old_sessions" class="summary-sig-name"><code>delete_old_sessions</code></a>(<span class=summary-sig-arg>self</span>,
70           <span class=summary-sig-arg>minutes</span>)</span></code>
71 <br />
72 Delete all sessions that have not been modified for N minutes.</td></tr>
73 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
74   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#delete_session" class="summary-sig-name"><code>delete_session</code></a>(<span class=summary-sig-arg>self</span>,
75           <span class=summary-sig-arg>session</span>)</span></code>
76 <br />
77 Delete the session in the store.</td></tr>
78 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
79   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#has_session" class="summary-sig-name"><code>has_session</code></a>(<span class=summary-sig-arg>self</span>,
80           <span class=summary-sig-arg>id</span>)</span></code>
81 <br />
82 Return true if the session exists in the store, else false.</td></tr>
83 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
84   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#iter_sessions" class="summary-sig-name"><code>iter_sessions</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
85 <br />
86 Return an iterable of (id, session) for all sessions in the store.</td></tr>
87 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
88   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#load_session" class="summary-sig-name"><code>load_session</code></a>(<span class=summary-sig-arg>self</span>,
89           <span class=summary-sig-arg>id</span>,
90           <span class=summary-sig-arg>default</span>)</span></code>
91 <br />
92 Return the session if it exists, else return 'default'.</td></tr>
93 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
94   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#save_session" class="summary-sig-name"><code>save_session</code></a>(<span class=summary-sig-arg>self</span>,
95           <span class=summary-sig-arg>session</span>)</span></code>
96 <br />
97 Save the session in the store.</td></tr>
98 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
99   <td><code><span class="summary-sig"><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#setup" class="summary-sig-name"><code>setup</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
100 <br />
101 Initialize the session store; e.g., create required database tables.</td></tr>
102 </table><br />
103
104
105 <!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
106 <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
107 <tr bgcolor="#70b0f0" class="summary">
108   <th colspan="2">Class Variable Summary</th></tr>
109 <tr><td align="right" valign="top" width="15%"><font size="-1"><code>bool</code></font></td>
110 <td><b><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#is_multiprocess_safe"><code>is_multiprocess_safe</code></a></b> = <span title="False"><code>False                             </code>
111 </span></td></tr>
112 <tr><td align="right" valign="top" width="15%"><font size="-1"><code>bool</code></font></td>
113 <td><b><a href="session2.store.MemorySessionStore.MemorySessionStore-class.html#is_thread_safe"><code>is_thread_safe</code></a></b> = <span title="False"><code>False                                   </code>
114 </span></td></tr>
115 </table><br />
116
117
118 <!-- =========== START OF METHOD DETAILS =========== -->
119 <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
120 <tr bgcolor="#70b0f0" class="details">
121   <th colspan="2">Method Details</th></tr>
122 </table>
123
124 <a name="delete_old_sessions"></a>
125 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
126   <h3><span class="sig"><span class="sig-name">delete_old_sessions</span>(<span class=sig-arg>self</span>,
127           <span class=sig-arg>minutes</span>)</span>
128   </h3>
129 <pre class="literalblock">
130 Delete all sessions that have not been modified for N minutes.  The
131 default implementation does nothing, meaning the store cannot delete
132 old sessions.
133
134 This method is never called by the session manager.  It's for your
135 application maintenance program; e.g., a daily cron job.
136 </pre>
137   <dl><dt></dt><dd>
138     <dl><dt><b>Overrides:</b></dt>
139       <dd><a href="session2.store.SessionStore.SessionStore-class.html#delete_old_sessions"><code>session2.store.SessionStore.SessionStore.delete_old_sessions</code></a></dd>
140     </dl>
141   </dd></dl>
142 </td></tr></table>
143
144 <a name="delete_session"></a>
145 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
146   <h3><span class="sig"><span class="sig-name">delete_session</span>(<span class=sig-arg>self</span>,
147           <span class=sig-arg>session</span>)</span>
148   </h3>
149 <pre class="literalblock">
150 Delete the session in the store.
151 </pre>
152   <dl><dt></dt><dd>
153     <dl><dt><b>Overrides:</b></dt>
154       <dd><a href="session2.store.SessionStore.SessionStore-class.html#delete_session"><code>session2.store.SessionStore.SessionStore.delete_session</code></a></dd>
155     </dl>
156   </dd></dl>
157 </td></tr></table>
158
159 <a name="has_session"></a>
160 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
161   <h3><span class="sig"><span class="sig-name">has_session</span>(<span class=sig-arg>self</span>,
162           <span class=sig-arg>id</span>)</span>
163   </h3>
164 <pre class="literalblock">
165 Return true if the session exists in the store, else false.
166 </pre>
167   <dl><dt></dt><dd>
168     <dl><dt><b>Overrides:</b></dt>
169       <dd><a href="session2.store.SessionStore.SessionStore-class.html#has_session"><code>session2.store.SessionStore.SessionStore.has_session</code></a></dd>
170     </dl>
171   </dd></dl>
172 </td></tr></table>
173
174 <a name="iter_sessions"></a>
175 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
176   <h3><span class="sig"><span class="sig-name">iter_sessions</span>(<span class=sig-arg>self</span>)</span>
177   </h3>
178 <pre class="literalblock">
179 Return an iterable of (id, session) for all sessions in the store.
180
181 This method is never called by the session manager; it's for admin
182 applications that want to browse the sessions.
183 </pre>
184   <dl><dt></dt><dd>
185     <dl><dt><b>Overrides:</b></dt>
186       <dd><a href="session2.store.SessionStore.SessionStore-class.html#iter_sessions"><code>session2.store.SessionStore.SessionStore.iter_sessions</code></a></dd>
187     </dl>
188   </dd></dl>
189 </td></tr></table>
190
191 <a name="load_session"></a>
192 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
193   <h3><span class="sig"><span class="sig-name">load_session</span>(<span class=sig-arg>self</span>,
194           <span class=sig-arg>id</span>,
195           <span class=sig-arg>default</span>=<span class=sig-default>None</span>)</span>
196   </h3>
197 <pre class="literalblock">
198 Return the session if it exists, else return 'default'.
199 </pre>
200   <dl><dt></dt><dd>
201     <dl><dt><b>Overrides:</b></dt>
202       <dd><a href="session2.store.SessionStore.SessionStore-class.html#load_session"><code>session2.store.SessionStore.SessionStore.load_session</code></a></dd>
203     </dl>
204   </dd></dl>
205 </td></tr></table>
206
207 <a name="save_session"></a>
208 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
209   <h3><span class="sig"><span class="sig-name">save_session</span>(<span class=sig-arg>self</span>,
210           <span class=sig-arg>session</span>)</span>
211   </h3>
212 <pre class="literalblock">
213 Save the session in the store.
214 </pre>
215   <dl><dt></dt><dd>
216     <dl><dt><b>Overrides:</b></dt>
217       <dd><a href="session2.store.SessionStore.SessionStore-class.html#save_session"><code>session2.store.SessionStore.SessionStore.save_session</code></a></dd>
218     </dl>
219   </dd></dl>
220 </td></tr></table>
221
222 <a name="setup"></a>
223 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
224   <h3><span class="sig"><span class="sig-name">setup</span>(<span class=sig-arg>self</span>)</span>
225   </h3>
226 <pre class="literalblock">
227 Initialize the session store; e.g., create required database tables.
228 If a previous store exists, overwrite it or raise an error.  The
229 default implmentation does nothing, meaning no setup is necessary.
230
231 This method is never called by the session manager; it's for your
232 application setup program.
233 </pre>
234   <dl><dt></dt><dd>
235     <dl><dt><b>Overrides:</b></dt>
236       <dd><a href="session2.store.SessionStore.SessionStore-class.html#setup"><code>session2.store.SessionStore.SessionStore.setup</code></a></dd>
237     </dl>
238   </dd></dl>
239 </td></tr></table>
240 <br />
241
242
243 <!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
244 <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
245 <tr bgcolor="#70b0f0" class="details">
246   <th colspan="2">Class Variable Details</th></tr>
247 </table>
248 <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
249 <a name="is_multiprocess_safe"></a>
250 <h3>is_multiprocess_safe</h3>
251 <dl>
252   <dt></dt>
253   <dd>
254     <dl>
255       <dt><b>Type:</b></dt>
256       <dd>
257           <code>bool</code>
258
259       </dd>
260 <span title="False">      <dt><b>Value:</b></dt>
261       <dd><table><tr><td>
262 <pre class="variable">
263 False                                                                  </pre>
264         </td></tr></table></dd>
265 </span>    </dl>
266   </dd>
267 </dl></td></tr></table>
268 <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
269 <a name="is_thread_safe"></a>
270 <h3>is_thread_safe</h3>
271 <dl>
272   <dt></dt>
273   <dd>
274     <dl>
275       <dt><b>Type:</b></dt>
276       <dd>
277           <code>bool</code>
278
279       </dd>
280 <span title="False">      <dt><b>Value:</b></dt>
281       <dd><table><tr><td>
282 <pre class="variable">
283 False                                                                  </pre>
284         </td></tr></table></dd>
285 </span>    </dl>
286   </dd>
287 </dl></td></tr></table>
288 <br />
289
290
291 <!-- =========== START OF NAVBAR =========== -->
292 <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
293   <tr valign="center">
294     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="session2-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
295     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
296     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
297     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
298     <th class="navbar" align="right" width="100%">
299       <table border="0" cellpadding="0" cellspacing="0">
300       <tr><th class="navbar" align="center">
301         <p class="nomargin">
302           session2
303       </p></th></tr></table>
304     </th>
305   </tr>
306 </table>
307
308 <table border="0" cellpadding="0" cellspacing="0" width="100%">
309   <tr>
310     <td align="left"><font size="-2">Generated by Epydoc 2.1 on Sun Oct 15 21:33:50 2006</font></td>
311     <td align="right"><a href="http://epydoc.sourceforge.net"
312                       ><font size="-2">http://epydoc.sf.net</font></a></td>
313   </tr>
314 </table>
315 </body>
316 </html>
Note: See TracBrowser for help on using the browser.