| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>DbEnv::cdsgroup_begin()</title> |
| 7 | <link rel="stylesheet" href="apiReference.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" /> |
| 10 | <link rel="up" href="txn.html" title="Chapter 13. The DbTxn Handle" /> |
| 11 | <link rel="prev" href="dbget_transactional.html" title="Db::get_transactional()" /> |
| 12 | <link rel="next" href="envget_tx_max.html" title="DbEnv::get_tx_max()" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">DbEnv::cdsgroup_begin()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="dbget_transactional.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 13. |
| 26 | The DbTxn Handle |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="envget_tx_max.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="envcdsgroup_begin"></a>DbEnv::cdsgroup_begin()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db_cxx.h> |
| 42 | |
| 43 | int |
| 44 | DbEnv::cdsgroup_begin(DbTxn **tid);</pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DbEnv::cdsgroup_begin()</code> method allocates a locker ID in an |
| 47 | environment configured for Berkeley DB Concurrent Data Store |
| 48 | applications. It copies a pointer to a |
| 49 | <a class="link" href="txn.html" title="Chapter 13. The DbTxn Handle">DbTxn</a> that uniquely identifies |
| 50 | the locker ID into the memory to which <span class="bold"><strong>tid</strong></span> refers. |
| 51 | Calling the |
| 52 | <a class="xref" href="txncommit.html" title="DbTxn::commit()">DbTxn::commit()</a> method will |
| 53 | discard the allocated locker ID. |
| 54 | </p> |
| 55 | <p> |
| 56 | See <a href="../../programmer_reference/cam.html#cam_intro" class="olink">Berkeley DB Concurrent Data Store applications</a> for more information about when this is |
| 57 | required. |
| 58 | </p> |
| 59 | <p> |
| 60 | The <code class="methodname">DbEnv::cdsgroup_begin()</code> method may be called at any time during |
| 61 | the life of the application. |
| 62 | </p> |
| 63 | <p> |
| 64 | The <code class="methodname">DbEnv::cdsgroup_begin()</code> <span> |
| 65 | |
| 66 | <span> |
| 67 | method either returns a non-zero error value or throws an |
| 68 | exception that encapsulates a non-zero error value on |
| 69 | failure, and returns 0 on success. |
| 70 | </span> |
| 71 | </span> |
| 72 | </p> |
| 73 | <div class="sect2" lang="en" xml:lang="en"> |
| 74 | <div class="titlepage"> |
| 75 | <div> |
| 76 | <div> |
| 77 | <h3 class="title"><a id="idp10236912"></a>Errors</h3> |
| 78 | </div> |
| 79 | </div> |
| 80 | </div> |
| 81 | <p> |
| 82 | The <code class="methodname">DbEnv::cdsgroup_begin()</code> <span> |
| 83 | |
| 84 | <span> |
| 85 | method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> |
| 86 | exception, encapsulating one of the following non-zero errors, or return one |
| 87 | of the following non-zero errors: |
| 88 | </span> |
| 89 | </span> |
| 90 | </p> |
| 91 | <div class="sect3" lang="en" xml:lang="en"> |
| 92 | <div class="titlepage"> |
| 93 | <div> |
| 94 | <div> |
| 95 | <h4 class="title"><a id="idp10247128"></a>ENOMEM</h4> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 | <p> |
| 100 | The maximum number of lockers has been reached. |
| 101 | </p> |
| 102 | </div> |
| 103 | </div> |
| 104 | <div class="sect2" lang="en" xml:lang="en"> |
| 105 | <div class="titlepage"> |
| 106 | <div> |
| 107 | <div> |
| 108 | <h3 class="title"><a id="idp10241840"></a>Class</h3> |
| 109 | </div> |
| 110 | </div> |
| 111 | </div> |
| 112 | <p> |
| 113 | <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>, <a class="link" href="txn.html" title="Chapter 13. The DbTxn Handle">DbTxn</a> |
| 114 | </p> |
| 115 | </div> |
| 116 | <div class="sect2" lang="en" xml:lang="en"> |
| 117 | <div class="titlepage"> |
| 118 | <div> |
| 119 | <div> |
| 120 | <h3 class="title"><a id="idp10248424"></a>See Also</h3> |
| 121 | </div> |
| 122 | </div> |
| 123 | </div> |
| 124 | <p> |
| 125 | <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a> |
| 126 | </p> |
| 127 | </div> |
| 128 | </div> |
| 129 | <div class="navfooter"> |
| 130 | <hr /> |
| 131 | <table width="100%" summary="Navigation footer"> |
| 132 | <tr> |
| 133 | <td width="40%" align="left"><a accesskey="p" href="dbget_transactional.html">Prev</a> </td> |
| 134 | <td width="20%" align="center"> |
| 135 | <a accesskey="u" href="txn.html">Up</a> |
| 136 | </td> |
| 137 | <td width="40%" align="right"> <a accesskey="n" href="envget_tx_max.html">Next</a></td> |
| 138 | </tr> |
| 139 | <tr> |
| 140 | <td width="40%" align="left" valign="top">Db::get_transactional() </td> |
| 141 | <td width="20%" align="center"> |
| 142 | <a accesskey="h" href="index.html">Home</a> |
| 143 | </td> |
| 144 | <td width="40%" align="right" valign="top"> DbEnv::get_tx_max()</td> |
| 145 | </tr> |
| 146 | </table> |
| 147 | </div> |
| 148 | </body> |
| 149 | </html> |