| 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>DB_ENV->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 12. The DB_TXN Handle" /> |
| 11 | <link rel="prev" href="dbget_transactional.html" title="DB->get_transactional()" /> |
| 12 | <link rel="next" href="envget_tx_max.html" title="DB_ENV->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">DB_ENV->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 12. |
| 26 | The DB_TXN 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>DB_ENV->cdsgroup_begin()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB_ENV->cdsgroup_begin(DB_ENV *dbenv, DB_TXN **tid); </pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DB_ENV->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 12. The DB_TXN Handle">DB_TXN</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="DB_TXN->commit()">DB_TXN->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">DB_ENV->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">DB_ENV->cdsgroup_begin()</code> <span> |
| 65 | <span> |
| 66 | method returns a non-zero error value on failure and 0 on success. |
| 67 | </span> |
| 68 | |
| 69 | </span> |
| 70 | </p> |
| 71 | <div class="sect2" lang="en" xml:lang="en"> |
| 72 | <div class="titlepage"> |
| 73 | <div> |
| 74 | <div> |
| 75 | <h3 class="title"><a id="idp54730216"></a>Errors</h3> |
| 76 | </div> |
| 77 | </div> |
| 78 | </div> |
| 79 | <p> |
| 80 | The <code class="methodname">DB_ENV->cdsgroup_begin()</code> <span> |
| 81 | <span> |
| 82 | method may fail and return one of the following non-zero errors: |
| 83 | </span> |
| 84 | |
| 85 | </span> |
| 86 | </p> |
| 87 | <div class="sect3" lang="en" xml:lang="en"> |
| 88 | <div class="titlepage"> |
| 89 | <div> |
| 90 | <div> |
| 91 | <h4 class="title"><a id="idp54743016"></a>ENOMEM</h4> |
| 92 | </div> |
| 93 | </div> |
| 94 | </div> |
| 95 | <p> |
| 96 | The maximum number of lockers has been reached. |
| 97 | </p> |
| 98 | </div> |
| 99 | </div> |
| 100 | <div class="sect2" lang="en" xml:lang="en"> |
| 101 | <div class="titlepage"> |
| 102 | <div> |
| 103 | <div> |
| 104 | <h3 class="title"><a id="idp54742488"></a>Class</h3> |
| 105 | </div> |
| 106 | </div> |
| 107 | </div> |
| 108 | <p> |
| 109 | <a class="link" href="env.html" title="Chapter 5. The DB_ENV Handle">DB_ENV</a>, <a class="link" href="txn.html" title="Chapter 12. The DB_TXN Handle">DB_TXN</a> |
| 110 | </p> |
| 111 | </div> |
| 112 | <div class="sect2" lang="en" xml:lang="en"> |
| 113 | <div class="titlepage"> |
| 114 | <div> |
| 115 | <div> |
| 116 | <h3 class="title"><a id="idp54740280"></a>See Also</h3> |
| 117 | </div> |
| 118 | </div> |
| 119 | </div> |
| 120 | <p> |
| 121 | <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a> |
| 122 | </p> |
| 123 | </div> |
| 124 | </div> |
| 125 | <div class="navfooter"> |
| 126 | <hr /> |
| 127 | <table width="100%" summary="Navigation footer"> |
| 128 | <tr> |
| 129 | <td width="40%" align="left"><a accesskey="p" href="dbget_transactional.html">Prev</a> </td> |
| 130 | <td width="20%" align="center"> |
| 131 | <a accesskey="u" href="txn.html">Up</a> |
| 132 | </td> |
| 133 | <td width="40%" align="right"> <a accesskey="n" href="envget_tx_max.html">Next</a></td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td width="40%" align="left" valign="top">DB->get_transactional() </td> |
| 137 | <td width="20%" align="center"> |
| 138 | <a accesskey="h" href="index.html">Home</a> |
| 139 | </td> |
| 140 | <td width="40%" align="right" valign="top"> DB_ENV->get_tx_max()</td> |
| 141 | </tr> |
| 142 | </table> |
| 143 | </div> |
| 144 | </body> |
| 145 | </html> |