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

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

transferred from

svn://cafepy.com:13690/

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.SessionStore.SessionStore</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.SessionStore-module.html">Module&nbsp;SessionStore</a> ::
35         Class&nbsp;SessionStore
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.SessionStore.SessionStore-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 SessionStore</h2>
45
46 <dl><dt><b>Known Subclasses:</b></dt>
47 <dd>
48     <a href="session2.store.DirectorySessionStore.DirectorySessionStore-class.html"><code>DirectorySessionStore</code></a>,
49     <a href="session2.store.DurusSessionStore.DurusSessionStore-class.html"><code>DurusSessionStore</code></a>,
50     <a href="session2.store.MySQLSessionStore.MySQLSessionStore-class.html"><code>MySQLSessionStore</code></a>,
51     <a href="session2.store.PostgresSessionStore.PostgresSessionStore-class.html"><code>PostgresSessionStore</code></a>,
52     <a href="session2.store.ShelveSessionStore.ShelveSessionStore-class.html"><code>ShelveSessionStore</code></a>,
53     <a href="session2.store.VolatileSessionStore.VolatileSessionStore-class.html"><code>VolatileSessionStore</code></a></dd></dl>
54
55 <hr/>
56
57 <p>Persistent <a href="session2.Session-module.html" class="link"><code>Session</code></a> storage API for session2's <a href="session2.SessionManager-module.html" class="link"><code>SessionManager</code></a>.</p>
58 <p>Subclass this class &amp; provide implementations of <a href="session2.store.SessionStore.SessionStore-class.html#load_session" class="link"><code>load_session</code></a>,
59 <a href="session2.store.SessionStore.SessionStore-class.html#save_session" class="link"><code>save_session</code></a>, and <a href="session2.store.SessionStore.SessionStore-class.html#delete_session" class="link"><code>delete_session</code></a>, and voila, persistent sessions!</p>
60 <hr/>
61
62
63 <!-- =========== START OF METHOD SUMMARY =========== -->
64 <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
65 <tr bgcolor="#70b0f0" class="summary">
66   <th colspan="2">Method Summary</th></tr>
67 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
68   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#delete_old_sessions" class="summary-sig-name"><code>delete_old_sessions</code></a>(<span class=summary-sig-arg>self</span>,
69           <span class=summary-sig-arg>minutes</span>)</span></code>
70 <br />
71 Delete all sessions that have not been modified for N minutes.</td></tr>
72 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
73   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#delete_session" class="summary-sig-name"><code>delete_session</code></a>(<span class=summary-sig-arg>self</span>,
74           <span class=summary-sig-arg>session</span>)</span></code>
75 <br />
76 Delete the session in the store.</td></tr>
77 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
78   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#has_session" class="summary-sig-name"><code>has_session</code></a>(<span class=summary-sig-arg>self</span>,
79           <span class=summary-sig-arg>id</span>)</span></code>
80 <br />
81 Return true if the session exists in the store, else false.</td></tr>
82 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
83   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#iter_sessions" class="summary-sig-name"><code>iter_sessions</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
84 <br />
85 Return an iterable of (id, session) for all sessions in the store.</td></tr>
86 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
87   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#load_session" class="summary-sig-name"><code>load_session</code></a>(<span class=summary-sig-arg>self</span>,
88           <span class=summary-sig-arg>id</span>,
89           <span class=summary-sig-arg>default</span>)</span></code>
90 <br />
91 Return the session if it exists, else return 'default'.</td></tr>
92 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
93   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#save_session" class="summary-sig-name"><code>save_session</code></a>(<span class=summary-sig-arg>self</span>,
94           <span class=summary-sig-arg>session</span>)</span></code>
95 <br />
96 Save the session in the store.</td></tr>
97 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
98   <td><code><span class="summary-sig"><a href="session2.store.SessionStore.SessionStore-class.html#setup" class="summary-sig-name"><code>setup</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
99 <br />
100 Initialize the session store; e.g., create required database tables.</td></tr>
101 </table><br />
102
103
104 <!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
105 <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
106 <tr bgcolor="#70b0f0" class="summary">
107   <th colspan="2">Class Variable Summary</th></tr>
108 <tr><td align="right" valign="top" width="15%"><font size="-1"><code>bool</code></font></td>
109 <td><b><a href="session2.store.SessionStore.SessionStore-class.html#is_multiprocess_safe"><code>is_multiprocess_safe</code></a></b> = <span title="False"><code>False                             </code>
110 </span></td></tr>
111 <tr><td align="right" valign="top" width="15%"><font size="-1"><code>bool</code></font></td>
112 <td><b><a href="session2.store.SessionStore.SessionStore-class.html#is_thread_safe"><code>is_thread_safe</code></a></b> = <span title="False"><code>False                                   </code>
113 </span></td></tr>
114 </table><br />
115
116
117 <!-- =========== START OF METHOD DETAILS =========== -->
118 <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
119 <tr bgcolor="#70b0f0" class="details">
120   <th colspan="2">Method Details</th></tr>
121 </table>
122
123 <a name="delete_old_sessions"></a>
124 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
125   <h3><span class="sig"><span class="sig-name">delete_old_sessions</span>(<span class=sig-arg>self</span>,
126           <span class=sig-arg>minutes</span>)</span>
127   </h3>
128 <p>Delete all sessions that have not been modified for N minutes.  The
129 default implementation does nothing, meaning the store cannot delete
130 old sessions.</p>
131 <p>This method is never called by the session manager.  It's for your
132 application maintenance program; e.g., a daily cron job.</p>
133   <dl><dt></dt><dd>
134   </dd></dl>
135 </td></tr></table>
136
137 <a name="delete_session"></a>
138 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
139   <h3><span class="sig"><span class="sig-name">delete_session</span>(<span class=sig-arg>self</span>,
140           <span class=sig-arg>session</span>)</span>
141   </h3>
142 <p>Delete the session in the store.</p>
143   <dl><dt></dt><dd>
144   </dd></dl>
145 </td></tr></table>
146
147 <a name="has_session"></a>
148 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
149   <h3><span class="sig"><span class="sig-name">has_session</span>(<span class=sig-arg>self</span>,
150           <span class=sig-arg>id</span>)</span>
151   </h3>
152 <p>Return true if the session exists in the store, else false.</p>
153   <dl><dt></dt><dd>
154   </dd></dl>
155 </td></tr></table>
156
157 <a name="iter_sessions"></a>
158 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
159   <h3><span class="sig"><span class="sig-name">iter_sessions</span>(<span class=sig-arg>self</span>)</span>
160   </h3>
161 <p>Return an iterable of (id, session) for all sessions in the store.</p>
162 <p>This method is never called by the session manager; it's for admin
163 applications that want to browse the sessions.</p>
164   <dl><dt></dt><dd>
165   </dd></dl>
166 </td></tr></table>
167
168 <a name="load_session"></a>
169 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
170   <h3><span class="sig"><span class="sig-name">load_session</span>(<span class=sig-arg>self</span>,
171           <span class=sig-arg>id</span>,
172           <span class=sig-arg>default</span>=<span class=sig-default>None</span>)</span>
173   </h3>
174 <p>Return the session if it exists, else return 'default'.</p>
175   <dl><dt></dt><dd>
176   </dd></dl>
177 </td></tr></table>
178
179 <a name="save_session"></a>
180 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
181   <h3><span class="sig"><span class="sig-name">save_session</span>(<span class=sig-arg>self</span>,
182           <span class=sig-arg>session</span>)</span>
183   </h3>
184 <p>Save the session in the store.</p>
185   <dl><dt></dt><dd>
186   </dd></dl>
187 </td></tr></table>
188
189 <a name="setup"></a>
190 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
191   <h3><span class="sig"><span class="sig-name">setup</span>(<span class=sig-arg>self</span>)</span>
192   </h3>
193 <p>Initialize the session store; e.g., create required database tables.
194 If a previous store exists, overwrite it or raise an error.  The
195 default implmenetation does nothing, meaning no setup is necessary.</p>
196 <p>This method is never called by the session manager; it's for your
197 application setup program.</p>
198   <dl><dt></dt><dd>
199   </dd></dl>
200 </td></tr></table>
201 <br />
202
203
204 <!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
205 <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
206 <tr bgcolor="#70b0f0" class="details">
207   <th colspan="2">Class Variable Details</th></tr>
208 </table>
209 <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
210 <a name="is_multiprocess_safe"></a>
211 <h3>is_multiprocess_safe</h3>
212 <dl>
213   <dt></dt>
214   <dd>
215     <dl>
216       <dt><b>Type:</b></dt>
217       <dd>
218           <code>bool</code>
219
220       </dd>
221 <span title="False">      <dt><b>Value:</b></dt>
222       <dd><table><tr><td>
223 <pre class="variable">
224 False                                                                  </pre>
225         </td></tr></table></dd>
226 </span>    </dl>
227   </dd>
228 </dl></td></tr></table>
229 <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
230 <a name="is_thread_safe"></a>
231 <h3>is_thread_safe</h3>
232 <dl>
233   <dt></dt>
234   <dd>
235     <dl>
236       <dt><b>Type:</b></dt>
237       <dd>
238           <code>bool</code>
239
240       </dd>
241 <span title="False">      <dt><b>Value:</b></dt>
242       <dd><table><tr><td>
243 <pre class="variable">
244 False                                                                  </pre>
245         </td></tr></table></dd>
246 </span>    </dl>
247   </dd>
248 </dl></td></tr></table>
249 <br />
250
251
252 <!-- =========== START OF NAVBAR =========== -->
253 <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
254   <tr valign="center">
255     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="session2-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
256     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
257     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
258     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
259     <th class="navbar" align="right" width="100%">
260       <table border="0" cellpadding="0" cellspacing="0">
261       <tr><th class="navbar" align="center">
262         <p class="nomargin">
263           session2
264       </p></th></tr></table>
265     </th>
266   </tr>
267 </table>
268
269 <table border="0" cellpadding="0" cellspacing="0" width="100%">
270   <tr>
271     <td align="left"><font size="-2">Generated by Epydoc 2.1 on Sat Feb  4 16:40:10 2006</font></td>
272     <td align="right"><a href="http://epydoc.sourceforge.net"
273                       ><font size="-2">http://epydoc.sf.net</font></a></td>
274   </tr>
275 </table>
276 </body>
277 </html>
Note: See TracBrowser for help on using the browser.