doc/api/python/ccm.SessionPool-class.html
changeset 432 f2ddfa555b0f
equal deleted inserted replaced
431:7685cec9fd3c 432:f2ddfa555b0f
       
     1 <?xml version="1.0" encoding="ascii"?>
       
     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>ccm.SessionPool</title>
       
     7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
       
     8   <script type="text/javascript" src="epydoc.js"></script>
       
     9 </head>
       
    10 
       
    11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
       
    12       alink="#204080">
       
    13 <!-- ==================== NAVIGATION BAR ==================== -->
       
    14 <table class="navbar" border="0" width="100%" cellpadding="0"
       
    15        bgcolor="#a0c0ff" cellspacing="0">
       
    16   <tr valign="middle">
       
    17 
       
    18   <!-- Tree link -->
       
    19       <th>&nbsp;&nbsp;&nbsp;<a
       
    20         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
    21 
       
    22   <!-- Index link -->
       
    23       <th>&nbsp;&nbsp;&nbsp;<a
       
    24         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
    25 
       
    26   <!-- Help link -->
       
    27       <th>&nbsp;&nbsp;&nbsp;<a
       
    28         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
    29 
       
    30       <th class="navbar" width="100%"></th>
       
    31   </tr>
       
    32 </table>
       
    33 <table width="100%" cellpadding="0" cellspacing="0">
       
    34   <tr valign="top">
       
    35     <td width="100%">
       
    36       <span class="breadcrumbs">
       
    37         <a href="ccm-module.html">Package&nbsp;ccm</a> ::
       
    38         Class&nbsp;SessionPool
       
    39       </span>
       
    40     </td>
       
    41     <td>
       
    42       <table cellpadding="0" cellspacing="0">
       
    43         <!-- hide/show private -->
       
    44         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
       
    45     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
       
    46         <tr><td align="right"><span class="options"
       
    47             >[<a href="frames.html" target="_top">frames</a
       
    48             >]&nbsp;|&nbsp;<a href="ccm.SessionPool-class.html"
       
    49             target="_top">no&nbsp;frames</a>]</span></td></tr>
       
    50       </table>
       
    51     </td>
       
    52   </tr>
       
    53 </table>
       
    54 <!-- ==================== CLASS DESCRIPTION ==================== -->
       
    55 <h1 class="epydoc">Class SessionPool</h1><span class="codelink"><a href="ccm-pysrc.html#SessionPool">source&nbsp;code</a></span><br /><br />
       
    56 <pre class="base-tree">
       
    57      object --+    
       
    58               |    
       
    59 <a href="ccm.AbstractSession-class.html">AbstractSession</a> --+
       
    60                   |
       
    61                  <strong class="uidshort">SessionPool</strong>
       
    62 </pre>
       
    63 
       
    64 <hr />
       
    65 Session that transparently handled several subsession, to easily enable
       
    66 multithreaded application.<br /><br />
       
    67 
       
    68 <!-- ==================== INSTANCE METHODS ==================== -->
       
    69 <a name="section-InstanceMethods"></a>
       
    70 <table class="summary" border="1" cellpadding="3"
       
    71        cellspacing="0" width="100%" bgcolor="white">
       
    72 <tr bgcolor="#70b0f0" class="table-header">
       
    73   <td colspan="2" class="table-header">
       
    74     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
    75       <tr valign="top">
       
    76         <td align="left"><span class="table-header">Instance Methods</span></td>
       
    77         <td align="right" valign="top"
       
    78          ><span class="options">[<a href="#section-InstanceMethods"
       
    79          class="privatelink" onclick="toggle_private();"
       
    80          >hide private</a>]</span></td>
       
    81       </tr>
       
    82     </table>
       
    83   </td>
       
    84 </tr>
       
    85 <tr>
       
    86     <td width="15%" align="right" valign="top" class="summary">
       
    87       <span class="summary-type">&nbsp;</span>
       
    88     </td><td class="summary">
       
    89       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
    90         <tr>
       
    91           <td><span class="summary-sig"><a href="ccm.SessionPool-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
       
    92         <span class="summary-sig-arg">username</span>,
       
    93         <span class="summary-sig-arg">password</span>,
       
    94         <span class="summary-sig-arg">engine</span>,
       
    95         <span class="summary-sig-arg">dbpath</span>,
       
    96         <span class="summary-sig-arg">database</span>=<span class="summary-sig-default">None</span>,
       
    97         <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">4</span>,
       
    98         <span class="summary-sig-arg">opener</span>=<span class="summary-sig-default">None</span>)</span><br />
       
    99       x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
       
   100           <td align="right" valign="top">
       
   101             <span class="codelink"><a href="ccm-pysrc.html#SessionPool.__init__">source&nbsp;code</a></span>
       
   102             
       
   103           </td>
       
   104         </tr>
       
   105       </table>
       
   106       
       
   107     </td>
       
   108   </tr>
       
   109 <tr class="private">
       
   110     <td width="15%" align="right" valign="top" class="summary">
       
   111       <span class="summary-type">&nbsp;</span>
       
   112     </td><td class="summary">
       
   113       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   114         <tr>
       
   115           <td><span class="summary-sig"><a name="_set_size"></a><span class="summary-sig-name">_set_size</span>(<span class="summary-sig-arg">self</span>,
       
   116         <span class="summary-sig-arg">size</span>)</span><br />
       
   117       Set the pool size</td>
       
   118           <td align="right" valign="top">
       
   119             <span class="codelink"><a href="ccm-pysrc.html#SessionPool._set_size">source&nbsp;code</a></span>
       
   120             
       
   121           </td>
       
   122         </tr>
       
   123       </table>
       
   124       
       
   125     </td>
       
   126   </tr>
       
   127 <tr class="private">
       
   128     <td width="15%" align="right" valign="top" class="summary">
       
   129       <span class="summary-type">&nbsp;</span>
       
   130     </td><td class="summary">
       
   131       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   132         <tr>
       
   133           <td><span class="summary-sig"><a name="_get_size"></a><span class="summary-sig-name">_get_size</span>(<span class="summary-sig-arg">self</span>)</span></td>
       
   134           <td align="right" valign="top">
       
   135             <span class="codelink"><a href="ccm-pysrc.html#SessionPool._get_size">source&nbsp;code</a></span>
       
   136             
       
   137           </td>
       
   138         </tr>
       
   139       </table>
       
   140       
       
   141     </td>
       
   142   </tr>
       
   143 <tr>
       
   144     <td width="15%" align="right" valign="top" class="summary">
       
   145       <span class="summary-type">&nbsp;</span>
       
   146     </td><td class="summary">
       
   147       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   148         <tr>
       
   149           <td><span class="summary-sig"><a href="ccm.SessionPool-class.html#execute" class="summary-sig-name">execute</a>(<span class="summary-sig-arg">self</span>,
       
   150         <span class="summary-sig-arg">cmdline</span>,
       
   151         <span class="summary-sig-arg">result</span>=<span class="summary-sig-default">None</span>)</span><br />
       
   152       Executing a ccm command on a free session.</td>
       
   153           <td align="right" valign="top">
       
   154             <span class="codelink"><a href="ccm-pysrc.html#SessionPool.execute">source&nbsp;code</a></span>
       
   155             
       
   156           </td>
       
   157         </tr>
       
   158       </table>
       
   159       
       
   160     </td>
       
   161   </tr>
       
   162 <tr>
       
   163     <td width="15%" align="right" valign="top" class="summary">
       
   164       <span class="summary-type">&nbsp;</span>
       
   165     </td><td class="summary">
       
   166       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   167         <tr>
       
   168           <td><span class="summary-sig"><a href="ccm.SessionPool-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">self</span>)</span><br />
       
   169       Closing all subsessions.</td>
       
   170           <td align="right" valign="top">
       
   171             <span class="codelink"><a href="ccm-pysrc.html#SessionPool.close">source&nbsp;code</a></span>
       
   172             
       
   173           </td>
       
   174         </tr>
       
   175       </table>
       
   176       
       
   177     </td>
       
   178   </tr>
       
   179 <tr class="private">
       
   180     <td width="15%" align="right" valign="top" class="summary">
       
   181       <span class="summary-type">&nbsp;</span>
       
   182     </td><td class="summary">
       
   183       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   184         <tr>
       
   185           <td><span class="summary-sig"><a href="ccm.SessionPool-class.html#_set_role_internal" class="summary-sig-name">_set_role_internal</a>(<span class="summary-sig-arg">self</span>,
       
   186         <span class="summary-sig-arg">role</span>)</span><br />
       
   187       Set role on all subsessions.</td>
       
   188           <td align="right" valign="top">
       
   189             <span class="codelink"><a href="ccm-pysrc.html#SessionPool._set_role_internal">source&nbsp;code</a></span>
       
   190             
       
   191           </td>
       
   192         </tr>
       
   193       </table>
       
   194       
       
   195     </td>
       
   196   </tr>
       
   197   <tr>
       
   198     <td colspan="2" class="summary">
       
   199     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="ccm.AbstractSession-class.html">AbstractSession</a></code></b>:
       
   200       <code><a href="ccm.AbstractSession-class.html#__del__">__del__</a></code>,
       
   201       <code><a href="ccm.AbstractSession-class.html#__repr__">__repr__</a></code>,
       
   202       <code><a href="ccm.AbstractSession-class.html#__str__">__str__</a></code>,
       
   203       <code><a href="ccm.AbstractSession-class.html#addr">addr</a></code>,
       
   204       <code><a href="ccm.AbstractSession-class.html#create">create</a></code>,
       
   205       <code><a href="ccm.AbstractSession-class.html#database">database</a></code>,
       
   206       <code><a href="ccm.AbstractSession-class.html#get_workarea_info">get_workarea_info</a></code>,
       
   207       <code><a href="ccm.AbstractSession-class.html#purposes">purposes</a></code>
       
   208       </p>
       
   209     <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="ccm.AbstractSession-class.html">AbstractSession</a></code></b> (private):
       
   210       <code><a href="ccm.AbstractSession-class.html#_get_home">_get_home</a></code>,
       
   211       <code><a href="ccm.AbstractSession-class.html#_get_role">_get_role</a></code>,
       
   212       <code><a href="ccm.AbstractSession-class.html#_set_home">_set_home</a></code>,
       
   213       <code><a href="ccm.AbstractSession-class.html#_set_role">_set_role</a></code>
       
   214       </p></div>
       
   215     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
       
   216       <code>__delattr__</code>,
       
   217       <code>__getattribute__</code>,
       
   218       <code>__hash__</code>,
       
   219       <code>__new__</code>,
       
   220       <code>__reduce__</code>,
       
   221       <code>__reduce_ex__</code>,
       
   222       <code>__setattr__</code>
       
   223       </p>
       
   224     </td>
       
   225   </tr>
       
   226 </table>
       
   227 <!-- ==================== CLASS VARIABLES ==================== -->
       
   228 <a name="section-ClassVariables"></a>
       
   229 <table class="summary" border="1" cellpadding="3"
       
   230        cellspacing="0" width="100%" bgcolor="white">
       
   231 <tr bgcolor="#70b0f0" class="table-header">
       
   232   <td colspan="2" class="table-header">
       
   233     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   234       <tr valign="top">
       
   235         <td align="left"><span class="table-header">Class Variables</span></td>
       
   236         <td align="right" valign="top"
       
   237          ><span class="options">[<a href="#section-ClassVariables"
       
   238          class="privatelink" onclick="toggle_private();"
       
   239          >hide private</a>]</span></td>
       
   240       </tr>
       
   241     </table>
       
   242   </td>
       
   243 </tr>
       
   244 <tr>
       
   245     <td width="15%" align="right" valign="top" class="summary">
       
   246       <span class="summary-type">&nbsp;</span>
       
   247     </td><td class="summary">
       
   248         <a name="size"></a><span class="summary-name">size</span> = <code title="property(_get_size, _set_size)">property(_get_size, _set_size)</code>
       
   249     </td>
       
   250   </tr>
       
   251   <tr>
       
   252     <td colspan="2" class="summary">
       
   253     <p class="indent-wrapped-lines"><b>Inherited from <code><a href="ccm.AbstractSession-class.html">AbstractSession</a></code></b>:
       
   254       <code><a href="ccm.AbstractSession-class.html#home">home</a></code>,
       
   255       <code><a href="ccm.AbstractSession-class.html#role">role</a></code>
       
   256       </p>
       
   257     </td>
       
   258   </tr>
       
   259 </table>
       
   260 <!-- ==================== PROPERTIES ==================== -->
       
   261 <a name="section-Properties"></a>
       
   262 <table class="summary" border="1" cellpadding="3"
       
   263        cellspacing="0" width="100%" bgcolor="white">
       
   264 <tr bgcolor="#70b0f0" class="table-header">
       
   265   <td colspan="2" class="table-header">
       
   266     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   267       <tr valign="top">
       
   268         <td align="left"><span class="table-header">Properties</span></td>
       
   269         <td align="right" valign="top"
       
   270          ><span class="options">[<a href="#section-Properties"
       
   271          class="privatelink" onclick="toggle_private();"
       
   272          >hide private</a>]</span></td>
       
   273       </tr>
       
   274     </table>
       
   275   </td>
       
   276 </tr>
       
   277   <tr>
       
   278     <td colspan="2" class="summary">
       
   279     <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
       
   280       <code>__class__</code>
       
   281       </p>
       
   282     </td>
       
   283   </tr>
       
   284 </table>
       
   285 <!-- ==================== METHOD DETAILS ==================== -->
       
   286 <a name="section-MethodDetails"></a>
       
   287 <table class="details" border="1" cellpadding="3"
       
   288        cellspacing="0" width="100%" bgcolor="white">
       
   289 <tr bgcolor="#70b0f0" class="table-header">
       
   290   <td colspan="2" class="table-header">
       
   291     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   292       <tr valign="top">
       
   293         <td align="left"><span class="table-header">Method Details</span></td>
       
   294         <td align="right" valign="top"
       
   295          ><span class="options">[<a href="#section-MethodDetails"
       
   296          class="privatelink" onclick="toggle_private();"
       
   297          >hide private</a>]</span></td>
       
   298       </tr>
       
   299     </table>
       
   300   </td>
       
   301 </tr>
       
   302 </table>
       
   303 <a name="__init__"></a>
       
   304 <div>
       
   305 <table class="details" border="1" cellpadding="3"
       
   306        cellspacing="0" width="100%" bgcolor="white">
       
   307 <tr><td>
       
   308   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   309   <tr valign="top"><td>
       
   310   <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
       
   311         <span class="sig-arg">username</span>,
       
   312         <span class="sig-arg">password</span>,
       
   313         <span class="sig-arg">engine</span>,
       
   314         <span class="sig-arg">dbpath</span>,
       
   315         <span class="sig-arg">database</span>=<span class="sig-default">None</span>,
       
   316         <span class="sig-arg">size</span>=<span class="sig-default">4</span>,
       
   317         <span class="sig-arg">opener</span>=<span class="sig-default">None</span>)</span>
       
   318     <br /><em class="fname">(Constructor)</em>
       
   319   </h3>
       
   320   </td><td align="right" valign="top"
       
   321     ><span class="codelink"><a href="ccm-pysrc.html#SessionPool.__init__">source&nbsp;code</a></span>&nbsp;
       
   322     </td>
       
   323   </table>
       
   324   
       
   325   x.__init__(...) initializes x; see x.__class__.__doc__ for signature
       
   326   <dl class="fields">
       
   327     <dt>Overrides:
       
   328       <a href="ccm.AbstractSession-class.html#__init__">AbstractSession.__init__</a>
       
   329     </dt>
       
   330   </dl>
       
   331 </td></tr></table>
       
   332 </div>
       
   333 <a name="execute"></a>
       
   334 <div>
       
   335 <table class="details" border="1" cellpadding="3"
       
   336        cellspacing="0" width="100%" bgcolor="white">
       
   337 <tr><td>
       
   338   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   339   <tr valign="top"><td>
       
   340   <h3 class="epydoc"><span class="sig"><span class="sig-name">execute</span>(<span class="sig-arg">self</span>,
       
   341         <span class="sig-arg">cmdline</span>,
       
   342         <span class="sig-arg">result</span>=<span class="sig-default">None</span>)</span>
       
   343   </h3>
       
   344   </td><td align="right" valign="top"
       
   345     ><span class="codelink"><a href="ccm-pysrc.html#SessionPool.execute">source&nbsp;code</a></span>&nbsp;
       
   346     </td>
       
   347   </table>
       
   348   
       
   349   Executing a ccm command on a free session.
       
   350   <dl class="fields">
       
   351     <dt>Overrides:
       
   352       <a href="ccm.AbstractSession-class.html#execute">AbstractSession.execute</a>
       
   353     </dt>
       
   354   </dl>
       
   355 </td></tr></table>
       
   356 </div>
       
   357 <a name="close"></a>
       
   358 <div>
       
   359 <table class="details" border="1" cellpadding="3"
       
   360        cellspacing="0" width="100%" bgcolor="white">
       
   361 <tr><td>
       
   362   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   363   <tr valign="top"><td>
       
   364   <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">self</span>)</span>
       
   365   </h3>
       
   366   </td><td align="right" valign="top"
       
   367     ><span class="codelink"><a href="ccm-pysrc.html#SessionPool.close">source&nbsp;code</a></span>&nbsp;
       
   368     </td>
       
   369   </table>
       
   370   
       
   371   Closing all subsessions.
       
   372   <dl class="fields">
       
   373     <dt>Overrides:
       
   374       <a href="ccm.AbstractSession-class.html#close">AbstractSession.close</a>
       
   375     </dt>
       
   376   </dl>
       
   377 </td></tr></table>
       
   378 </div>
       
   379 <a name="_set_role_internal"></a>
       
   380 <div class="private">
       
   381 <table class="details" border="1" cellpadding="3"
       
   382        cellspacing="0" width="100%" bgcolor="white">
       
   383 <tr><td>
       
   384   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   385   <tr valign="top"><td>
       
   386   <h3 class="epydoc"><span class="sig"><span class="sig-name">_set_role_internal</span>(<span class="sig-arg">self</span>,
       
   387         <span class="sig-arg">role</span>)</span>
       
   388   </h3>
       
   389   </td><td align="right" valign="top"
       
   390     ><span class="codelink"><a href="ccm-pysrc.html#SessionPool._set_role_internal">source&nbsp;code</a></span>&nbsp;
       
   391     </td>
       
   392   </table>
       
   393   
       
   394   Set role on all subsessions.
       
   395   <dl class="fields">
       
   396     <dt>Overrides:
       
   397       <a href="ccm.AbstractSession-class.html#_set_role_internal">AbstractSession._set_role_internal</a>
       
   398     </dt>
       
   399   </dl>
       
   400 </td></tr></table>
       
   401 </div>
       
   402 <br />
       
   403 <!-- ==================== NAVIGATION BAR ==================== -->
       
   404 <table class="navbar" border="0" width="100%" cellpadding="0"
       
   405        bgcolor="#a0c0ff" cellspacing="0">
       
   406   <tr valign="middle">
       
   407 
       
   408   <!-- Tree link -->
       
   409       <th>&nbsp;&nbsp;&nbsp;<a
       
   410         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
   411 
       
   412   <!-- Index link -->
       
   413       <th>&nbsp;&nbsp;&nbsp;<a
       
   414         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
   415 
       
   416   <!-- Help link -->
       
   417       <th>&nbsp;&nbsp;&nbsp;<a
       
   418         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
   419 
       
   420       <th class="navbar" width="100%"></th>
       
   421   </tr>
       
   422 </table>
       
   423 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
       
   424   <tr>
       
   425     <td align="left" class="footer">
       
   426     Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:18 2009
       
   427     </td>
       
   428     <td align="right" class="footer">
       
   429       <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
       
   430     </td>
       
   431   </tr>
       
   432 </table>
       
   433 
       
   434 <script type="text/javascript">
       
   435   <!--
       
   436   // Private objects are initially displayed (because if
       
   437   // javascript is turned off then we want them to be
       
   438   // visible); but by default, we want to hide them.  So hide
       
   439   // them unless we have a cookie that says to show them.
       
   440   checkCookie()
       
   441   // -->
       
   442 </script>
       
   443   
       
   444 </body>
       
   445 </html>