• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/C/
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-&gt;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-&gt;get_transactional()" />
12    <link rel="next" href="envget_tx_max.html" title="DB_ENV-&gt;get_tx_max()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;cdsgroup_begin()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="dbget_transactional.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 12. 
23                The DB_TXN Handle 
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="envget_tx_max.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="envcdsgroup_begin"></a>DB_ENV-&gt;cdsgroup_begin()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;cdsgroup_begin(DB_ENV *dbenv, DB_TXN **tid);  </pre>
42      <p>
43         The <code class="methodname">DB_ENV-&gt;cdsgroup_begin()</code> method allocates a locker ID in an
44         environment configured for Berkeley DB Concurrent Data Store
45         applications.  It copies a pointer to a 
46         <a class="link" href="txn.html" title="Chapter 12.  The DB_TXN Handle">DB_TXN</a>  that uniquely identifies
47         the locker ID into the memory to which <span class="bold"><strong>tid</strong></span> refers.  
48         Calling the 
49         <a class="xref" href="txncommit.html" title="DB_TXN-&gt;commit()">DB_TXN-&gt;commit()</a>  method will
50         discard the allocated locker ID.
51    </p>
52      <p>
53         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
54         required.
55    </p>
56      <p>
57         The <code class="methodname">DB_ENV-&gt;cdsgroup_begin()</code> method may be called at any time during
58         the life of the application.
59    </p>
60      <p>
61         The <code class="methodname">DB_ENV-&gt;cdsgroup_begin()</code> <span>
62            <span>
63                  method returns a non-zero error value on failure and 0 on success.
64            </span>
65            
66        </span>
67    </p>
68      <div class="sect2" lang="en" xml:lang="en">
69        <div class="titlepage">
70          <div>
71            <div>
72              <h3 class="title"><a id="id1707449"></a>Errors</h3>
73            </div>
74          </div>
75        </div>
76        <p>
77                     The <code class="methodname">DB_ENV-&gt;cdsgroup_begin()</code> <span>
78            <span>
79                 method may fail and return one of the following non-zero errors:
80            </span>
81            
82        </span>
83                </p>
84        <div class="sect3" lang="en" xml:lang="en">
85          <div class="titlepage">
86            <div>
87              <div>
88                <h4 class="title"><a id="id1707248"></a>ENOMEM</h4>
89              </div>
90            </div>
91          </div>
92          <p>
93                The maximum number of lockers has been reached.
94            </p>
95        </div>
96      </div>
97      <div class="sect2" lang="en" xml:lang="en">
98        <div class="titlepage">
99          <div>
100            <div>
101              <h3 class="title"><a id="id1707450"></a>Class</h3>
102            </div>
103          </div>
104        </div>
105        <p>
106                <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>  
107            </p>
108      </div>
109      <div class="sect2" lang="en" xml:lang="en">
110        <div class="titlepage">
111          <div>
112            <div>
113              <h3 class="title"><a id="id1707510"></a>See Also</h3>
114            </div>
115          </div>
116        </div>
117        <p>
118                     <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a> 
119                </p>
120      </div>
121    </div>
122    <div class="navfooter">
123      <hr />
124      <table width="100%" summary="Navigation footer">
125        <tr>
126          <td width="40%" align="left"><a accesskey="p" href="dbget_transactional.html">Prev</a> </td>
127          <td width="20%" align="center">
128            <a accesskey="u" href="txn.html">Up</a>
129          </td>
130          <td width="40%" align="right"> <a accesskey="n" href="envget_tx_max.html">Next</a></td>
131        </tr>
132        <tr>
133          <td width="40%" align="left" valign="top">DB-&gt;get_transactional() </td>
134          <td width="20%" align="center">
135            <a accesskey="h" href="index.html">Home</a>
136          </td>
137          <td width="40%" align="right" valign="top"> DB_ENV-&gt;get_tx_max()</td>
138        </tr>
139      </table>
140    </div>
141  </body>
142</html>
143