File: dbstl_global_functions.html

package info (click to toggle)
db5.3 5.3.28%2Bdfsg1-0.8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 158,400 kB
  • sloc: ansic: 448,406; java: 111,824; tcl: 80,544; sh: 44,326; cs: 33,697; cpp: 21,604; perl: 14,557; xml: 10,799; makefile: 4,077; javascript: 1,998; yacc: 1,003; awk: 965; sql: 801; erlang: 342; python: 216; php: 24; asm: 14
file content (313 lines) | stat: -rw-r--r-- 12,586 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Chapter 1.  Dbstl Global Public Functions</title>
    <link rel="stylesheet" href="apiReference.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
    <link rel="up" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
    <link rel="prev" href="moreinfo.html" title="For More Information" />
    <link rel="next" href="stldbstl_global_functionsclose_all_dbs.html" title="close_all_dbs" />
  </head>
  <body>
    <div xmlns="" class="navheader">
      <div class="libver">
        <p>Library Version 11.2.5.3</p>
      </div>
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Chapter 1. 
 Dbstl Global Public Functions  </th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="moreinfo.html">Prev</a> </td>
          <th width="60%" align="center"> </th>
          <td width="20%" align="right"> <a accesskey="n" href="stldbstl_global_functionsclose_all_dbs.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="chapter" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title"><a id="dbstl_global_functions"></a>Chapter 1. 
 Dbstl Global Public Functions  </h2>
          </div>
        </div>
      </div>
      <h4><a id="idp49799720"></a> Public Members </h4>
      <div class="informaltable">
        <table border="1" width="80%">
          <colgroup>
            <col />
            <col />
          </colgroup>
          <thead>
            <tr>
              <th>Member</th>
              <th>Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>
<a class="xref" href="dbstl_global_functions.html#stldbstl_global_functionsclose_db" title="close_db">close_db</a>
</td>
              <td>
   <p>Close pdb regardless of reference count. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsclose_all_dbs.html" title="close_all_dbs">close_all_dbs</a>
</td>
              <td>
   <p>Close all open database handles regardless of reference count. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsclose_db_env.html" title="close_db_env">close_db_env</a>
</td>
              <td>
   <p>Close specified database environment handle regardless of reference count. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsclose_all_db_envs.html" title="close_all_db_envs">close_all_db_envs</a>
</td>
              <td>
   <p>Close all open database environment handles regardless of reference count. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsbegin_txn.html" title="begin_txn">begin_txn</a>
</td>
              <td>
   <p>Begin a new transaction from the specified environment "env". </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionscommit_txn.html" title="commit_txn">commit_txn</a>
</td>
              <td>
   <p>Commit current transaction opened in the environment "env". </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsabort_txn.html" title="abort_txn">abort_txn</a>
</td>
              <td>
   <p>Abort current transaction of environment "env". </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionscurrent_txn.html" title="current_txn">current_txn</a>
</td>
              <td>
   <p>Get current transaction of environment "env". </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsset_current_txn_handle.html" title="set_current_txn_handle">set_current_txn_handle</a>
</td>
              <td>
   <p>Set environment env's current transaction handle to be newtxn. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsregister_db.html" title="register_db">register_db</a>
</td>
              <td>
   <p>Register a Db handle "pdb1". </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsregister_db_env.html" title="register_db_env">register_db_env</a>
</td>
              <td>
   <p>Register a DbEnv handle env1, this handle and handles opened in it will be closed by ResourceManager
. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsopen_db.html" title="open_db">open_db</a>
</td>
              <td>
   <p>Helper function to open a database and register it into dbstl for the calling thread. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsopen_env.html" title="open_env">open_env</a>
</td>
              <td>
   <p>Helper function to open an environment and register it into dbstl for the calling thread. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsalloc_mutex.html" title="alloc_mutex">alloc_mutex</a>
</td>
              <td>
   <p>Allocate a Berkeley DB mutex. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionslock_mutex.html" title="lock_mutex">lock_mutex</a>
</td>
              <td>
   <p>Lock a mutex, wait if it is held by another thread. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsunlock_mutex.html" title="unlock_mutex">unlock_mutex</a>
</td>
              <td>
   <p>Unlock a mutex, and return immediately. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsfree_mutex.html" title="free_mutex">free_mutex</a>
</td>
              <td>
   <p>Free a mutex, and return immediately. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsdbstl_startup.html" title="dbstl_startup">dbstl_startup</a>
</td>
              <td>
   <p>If there are multiple threads within a process that make use of dbstl, then this function should be called in a single thread mutual exclusively before any use of dbstl in a process; Otherwise, you don't need to call it, but are allowed to call it anyway. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsdbstl_exit.html" title="dbstl_exit">dbstl_exit</a>
</td>
              <td>
   <p>This function releases any memory allocated in the heap by code of dbstl. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsdbstl_thread_exit.html" title="dbstl_thread_exit">
dbstl_thread_exit
</a>
</td>
              <td>
   <p>This function closes all Berkeley DB handles in the right order, if other threads do not use
them. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsoperator_eq.html" title="operator==">operator==</a>
</td>
              <td>
   <p>Operators to compare two Dbt objects. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsset_global_dbfile_suffix_number.html" title="set_global_dbfile_suffix_number">set_global_dbfile_suffix_number</a>
</td>
              <td>
   <p>If exisiting random temporary database name generation mechanism is still causing name clashes, users can set this global suffix number which will be append to each temporary database file name and incremented after each append, and by default it is 0. </p>        </td>
            </tr>
            <tr>
              <td>
<a class="xref" href="stldbstl_global_functionsclose_db_cursors.html" title="close_db_cursors">close_db_cursors</a>
</td>
              <td>
   <p>Close cursors opened in dbp1. </p>        </td>
            </tr>
          </tbody>
        </table>
      </div>
      <h4><a id="idp49808344"></a>
Group</h4>
      <p>
None</p>
      <div class="sect1" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title" style="clear: both"><a id="stldbstl_global_functionsclose_db"></a>close_db</h2>
            </div>
          </div>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="stldbstl_global_functionsclose_db_details"></a>Function Details</h3>
              </div>
            </div>
          </div>
          <pre class="programlisting">
 void close_db(Db *pdb)
 </pre>
          <p>Close pdb regardless of reference count. </p>
          <p>You must make sure pdb is not used by others before calling this method. You can close the underlying database of a container and assign another database with right configurations to it, if the configuration is not suitable for the container, there will be an <a class="link" href="InvalidArgumentException.html" title="Chapter 39.  InvalidArgumentException">InvalidArgumentException</a>
 type of exception thrown. You can't use the container after you called close_db and before setting another valid database handle to the container via <a class="link" href="stldb_containerset_db_handle.html" title="set_db_handle">db_container::set_db_handle()</a>
 function. </p>
          <div class="sect3" lang="en" xml:lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h4 class="title"><a id="idp49893056"></a>Parameters</h4>
                </div>
              </div>
            </div>
            <div class="sect4" lang="en" xml:lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h5 class="title"><a id="idp49893248"></a>pdb</h5>
                  </div>
                </div>
              </div>
              <p>The database handle to close. </p>
            </div>
          </div>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="idp49880280"></a>Group: Functions to close database/environments.</h3>
              </div>
            </div>
          </div>
          <p>Normally you don't have to close any database or environment handles, they will be closed automatically.</p>
          <p>Though you still have the following API to close them. </p>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="idp49859256"></a>Class</h3>
              </div>
            </div>
          </div>
          <p>
  <a class="link" href="dbstl_global_functions.html" title="Chapter 1.  Dbstl Global Public Functions">dbstl_global_functions</a>
     </p>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="moreinfo.html">Prev</a> </td>
          <td width="20%" align="center"> </td>
          <td width="40%" align="right"> <a accesskey="n" href="stldbstl_global_functionsclose_all_dbs.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">For More Information </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> close_all_dbs</td>
        </tr>
      </table>
    </div>
  </body>
</html>