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

Revision 9, 12.6 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.ShelveSessionStore.ShelveSessionStore</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.ShelveSessionStore-module.html">Module&nbsp;ShelveSessionStore</a> ::
35         Class&nbsp;ShelveSessionStore
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.ShelveSessionStore.ShelveSessionStore-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 ShelveSessionStore</h2>
45
46 <pre class="base-tree">
47 <a href="session2.store.SessionStore.SessionStore-class.html"><code>SessionStore</code></a> --+
48                |
49               <b>ShelveSessionStore</b>
50 </pre><br />
51
52 <hr/>
53
54 <p>Open a 'shelve' dictionary with the given filename, and store sessions
55 in it.</p>
56 <p>Shelve is not thread safe or multiprocess safe.  See the &quot;Restrictions&quot;
57 section for the shelve module in the Python Library Reference for
58 information about file locking.</p>
59 <hr/>
60
61
62 <!-- =========== START OF METHOD SUMMARY =========== -->
63 <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
64 <tr bgcolor="#70b0f0" class="summary">
65   <th colspan="2">Method Summary</th></tr>
66 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
67   <td><code><span class="summary-sig"><a href="session2.store.ShelveSessionStore.ShelveSessionStore-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
68           <span class=summary-sig-arg>filename</span>)</span></code>
69 <br />
70 __init__ takes the filename to use as the shelve store.</td></tr>
71 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
72   <td><code><span class="summary-sig"><a href="session2.store.ShelveSessionStore.ShelveSessionStore-class.html#delete_session" class="summary-sig-name"><code>delete_session</code></a>(<span class=summary-sig-arg>self</span>,
73           <span class=summary-sig-arg>session</span>)</span></code>
74 <br />
75 Delete the given session from the shelf.</td></tr>
76 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
77   <td><code><span class="summary-sig"><a href="session2.store.ShelveSessionStore.ShelveSessionStore-class.html#load_session" class="summary-sig-name"><code>load_session</code></a>(<span class=summary-sig-arg>self</span>,
78           <span class=summary-sig-arg>id</span>,
79           <span class=summary-sig-arg>default</span>)</span></code>
80 <br />
81 Load the session from the shelf.</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.ShelveSessionStore.ShelveSessionStore-class.html#open" class="summary-sig-name"><code>open</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
84 <br />
85 Open the shelve store file.</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.ShelveSessionStore.ShelveSessionStore-class.html#save_session" class="summary-sig-name"><code>save_session</code></a>(<span class=summary-sig-arg>self</span>,
88           <span class=summary-sig-arg>session</span>)</span></code>
89 <br />
90 Save the session to the shelf.</td></tr>
91 <tr bgcolor="#e8f0f8" class="group">
92   <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Inherited from SessionStore</th></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.SessionStore.SessionStore-class.html#delete_old_sessions" class="summary-sig-name"><code>delete_old_sessions</code></a>(<span class=summary-sig-arg>self</span>,
95           <span class=summary-sig-arg>minutes</span>)</span></code>
96 <br />
97 Delete all sessions that have not been modified for N minutes.</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.SessionStore.SessionStore-class.html#has_session" class="summary-sig-name"><code>has_session</code></a>(<span class=summary-sig-arg>self</span>,
100           <span class=summary-sig-arg>id</span>)</span></code>
101 <br />
102 Return true if the session exists in the store, else false.</td></tr>
103 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
104   <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>
105 <br />
106 Return an iterable of (id, session) for all sessions in the store.</td></tr>
107 <tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
108   <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>
109 <br />
110 Initialize the session store; e.g., create required database tables.</td></tr>
111 </table><br />
112
113
114 <!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
115 <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
116 <tr bgcolor="#70b0f0" class="summary">
117   <th colspan="2">Class Variable Summary</th></tr>
118 <tr><td align="right" valign="top" width="15%"><font size="-1"><code>bool</code></font></td>
119 <td><b><a href="session2.store.ShelveSessionStore.ShelveSessionStore-class.html#is_multiprocess_safe"><code>is_multiprocess_safe</code></a></b> = <span title="False"><code>False                             </code>
120 </span></td></tr>
121 <tr><td align="right" valign="top" width="15%"><font size="-1"><code>bool</code></font></td>
122 <td><b><a href="session2.store.ShelveSessionStore.ShelveSessionStore-class.html#is_thread_safe"><code>is_thread_safe</code></a></b> = <span title="False"><code>False                                   </code>
123 </span></td></tr>
124 </table><br />
125
126
127 <!-- =========== START OF METHOD DETAILS =========== -->
128 <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
129 <tr bgcolor="#70b0f0" class="details">
130   <th colspan="2">Method Details</th></tr>
131 </table>
132
133 <a name="__init__"></a>
134 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
135   <h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
136           <span class=sig-arg>filename</span>)</span>
137     <br /><i>(Constructor)</i>
138   </h3>
139 <p>__init__ takes the filename to use as the shelve store.</p>
140   <dl><dt></dt><dd>
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 <p>Delete the given session from the shelf.</p>
150   <dl><dt></dt><dd>
151     <dl><dt><b>Overrides:</b></dt>
152       <dd><a href="session2.store.SessionStore.SessionStore-class.html#delete_session"><code>session2.store.SessionStore.SessionStore.delete_session</code></a></dd>
153     </dl>
154   </dd></dl>
155 </td></tr></table>
156
157 <a name="load_session"></a>
158 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
159   <h3><span class="sig"><span class="sig-name">load_session</span>(<span class=sig-arg>self</span>,
160           <span class=sig-arg>id</span>,
161           <span class=sig-arg>default</span>=<span class=sig-default>None</span>)</span>
162   </h3>
163 <p>Load the session from the shelf.</p>
164   <dl><dt></dt><dd>
165     <dl><dt><b>Overrides:</b></dt>
166       <dd><a href="session2.store.SessionStore.SessionStore-class.html#load_session"><code>session2.store.SessionStore.SessionStore.load_session</code></a></dd>
167     </dl>
168   </dd></dl>
169 </td></tr></table>
170
171 <a name="open"></a>
172 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
173   <h3><span class="sig"><span class="sig-name">open</span>(<span class=sig-arg>self</span>)</span>
174   </h3>
175 <p>Open the shelve store file.</p>
176   <dl><dt></dt><dd>
177   </dd></dl>
178 </td></tr></table>
179
180 <a name="save_session"></a>
181 <table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
182   <h3><span class="sig"><span class="sig-name">save_session</span>(<span class=sig-arg>self</span>,
183           <span class=sig-arg>session</span>)</span>
184   </h3>
185 <p>Save the session to the shelf.</p>
186   <dl><dt></dt><dd>
187     <dl><dt><b>Overrides:</b></dt>
188       <dd><a href="session2.store.SessionStore.SessionStore-class.html#save_session"><code>session2.store.SessionStore.SessionStore.save_session</code></a></dd>
189     </dl>
190   </dd></dl>
191 </td></tr></table>
192 <br />
193
194
195 <!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
196 <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
197 <tr bgcolor="#70b0f0" class="details">
198   <th colspan="2">Class Variable Details</th></tr>
199 </table>
200 <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
201 <a name="is_multiprocess_safe"></a>
202 <h3>is_multiprocess_safe</h3>
203 <dl>
204   <dt></dt>
205   <dd>
206     <dl>
207       <dt><b>Type:</b></dt>
208       <dd>
209           <code>bool</code>
210
211       </dd>
212 <span title="False">      <dt><b>Value:</b></dt>
213       <dd><table><tr><td>
214 <pre class="variable">
215 False                                                                  </pre>
216         </td></tr></table></dd>
217 </span>    </dl>
218   </dd>
219 </dl></td></tr></table>
220 <table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
221 <a name="is_thread_safe"></a>
222 <h3>is_thread_safe</h3>
223 <dl>
224   <dt></dt>
225   <dd>
226     <dl>
227       <dt><b>Type:</b></dt>
228       <dd>
229           <code>bool</code>
230
231       </dd>
232 <span title="False">      <dt><b>Value:</b></dt>
233       <dd><table><tr><td>
234 <pre class="variable">
235 False                                                                  </pre>
236         </td></tr></table></dd>
237 </span>    </dl>
238   </dd>
239 </dl></td></tr></table>
240 <br />
241
242
243 <!-- =========== START OF NAVBAR =========== -->
244 <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
245   <tr valign="center">
246     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="session2-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
247     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
248     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
249     <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
250     <th class="navbar" align="right" width="100%">
251       <table border="0" cellpadding="0" cellspacing="0">
252       <tr><th class="navbar" align="center">
253         <p class="nomargin">
254           session2
255       </p></th></tr></table>
256     </th>
257   </tr>
258 </table>
259
260 <table border="0" cellpadding="0" cellspacing="0" width="100%">
261   <tr>
262     <td align="left"><font size="-2">Generated by Epydoc 2.1 on Sat Feb  4 16:40:10 2006</font></td>
263     <td align="right"><a href="http://epydoc.sourceforge.net"
264                       ><font size="-2">http://epydoc.sf.net</font></a></td>
265   </tr>
266 </table>
267 </body>
268 </html>
Note: See TracBrowser for help on using the browser.