File: scope.html

package info (click to toggle)
evolution-data-server 1.0.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 39,504 kB
  • ctags: 26,423
  • sloc: ansic: 175,347; tcl: 30,499; sh: 20,699; perl: 11,320; xml: 9,039; java: 7,653; cpp: 6,029; makefile: 4,866; awk: 1,338; yacc: 1,103; sed: 772; cs: 505; lex: 134; asm: 14
file content (74 lines) | stat: -rw-r--r-- 6,306 bytes parent folder | download | duplicates (3)
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
<!--$Id: scope.html,v 1.1.1.1 2003/11/20 22:14:15 toshok Exp $-->
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Berkeley DB handles</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a><a name="3"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Programmer Notes</dl></h3></td>
<td align=right><a href="../../ref/program/mt.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/program/namespace.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h1 align=center>Berkeley DB handles</h1>
<p>The Berkeley DB library has a number of object handles.  The following table
lists those handles, their scope, and whether they are free-threaded
(that is, whether multiple threads within a process can share them).
<p><dl compact>
<p><dt><a href="../../api_c/env_class.html">DB_ENV</a><dd>The <a href="../../api_c/env_class.html">DB_ENV</a> handle, created by the <a href="../../api_c/env_create.html">db_env_create</a> method, refers
to a Berkeley DB database environment -- a collection of Berkeley DB subsystems,
log files and databases.  <a href="../../api_c/env_class.html">DB_ENV</a> handles are free-threaded if
the <a href="../../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag is specified to the <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a> method when
the environment is opened.  The handle should not be closed while any
other handle remains open that is using it as a reference (for example,
<a href="../../api_c/db_class.html">DB</a> or <a href="../../api_c/txn_class.html">DB_TXN</a>).  Once either the <a href="../../api_c/env_close.html">DB_ENV-&gt;close</a> or
<a href="../../api_c/env_remove.html">DB_ENV-&gt;remove</a> methods are called, the handle may not be accessed again,
regardless of the function's return.
<p><dt><a href="../../api_c/txn_class.html">DB_TXN</a><dd>The <a href="../../api_c/txn_class.html">DB_TXN</a> handle, created by the <a href="../../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a> method, refers to
a single transaction.  The handle is not free-threaded; and transactions
may not span threads, nor may transactions be used by more than a single
thread.  Once the <a href="../../api_c/txn_abort.html">DB_TXN-&gt;abort</a> or <a href="../../api_c/txn_commit.html">DB_TXN-&gt;commit</a> methods are called,
the handle may not be accessed again, regardless of the function's
return.  In addition, parent transactions may not issue any Berkeley DB
operations while they have active child transactions (child transactions
that have not yet been committed or aborted) except for
<a href="../../api_c/txn_begin.html">DB_ENV-&gt;txn_begin</a>, <a href="../../api_c/txn_abort.html">DB_TXN-&gt;abort</a> and <a href="../../api_c/txn_commit.html">DB_TXN-&gt;commit</a>.
<p><dt><a href="../../api_c/logc_class.html">DB_LOGC</a><dd>The <a href="../../api_c/logc_class.html">DB_LOGC</a> handle refers to a cursor into the log files.  The
handle is not free-threaded.  Once the <a href="../../api_c/logc_close.html">DB_LOGC-&gt;close</a> method is called,
the handle may not be accessed again, regardless of the function's
return.
<p><dt><a href="../../api_c/mempfile_class.html">DB_MPOOLFILE</a><dd>The <a href="../../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle refers to an open file in the shared
memory buffer pool of the database environment.  The handle is not
free-threaded.  Once the <a href="../../api_c/memp_fclose.html">DB_MPOOLFILE-&gt;close</a> method is called, the handle may
not be accessed again, regardless of the function's return.
<p><dt><a href="../../api_c/db_class.html">DB</a><dd>The <a href="../../api_c/db_class.html">DB</a> handle, created by the <a href="../../api_c/db_create.html">db_create</a> method, refers to a
single Berkeley DB database, which may or may not be part of a database
environment.  <a href="../../api_c/db_class.html">DB</a> handles are free-threaded if the
<a href="../../api_c/env_open.html#DB_THREAD">DB_THREAD</a> flag is specified to the <a href="../../api_c/db_open.html">DB-&gt;open</a> method when the
database is opened or if the database environment in which the database
is opened is free-threaded.  The handle should not be closed while any
other handle that refers to the database is in use; for example,
database handles must not be closed while cursor handles into the
database remain open, or transactions that include operations on the
database have not yet been committed or aborted.  Once the
<a href="../../api_c/db_close.html">DB-&gt;close</a>, <a href="../../api_c/db_remove.html">DB-&gt;remove</a>, or <a href="../../api_c/db_rename.html">DB-&gt;rename</a> methods are
called, the handle may not be accessed again, regardless of the
function's return.
<p><dt><a href="../../api_c/dbc_class.html">DBC</a><dd>The <a href="../../api_c/dbc_class.html">DBC</a> handle refers to a cursor into a Berkeley DB database.  The
handle is not free-threaded, and cursors may not span threads; nor may
cursors be used by more than a single thread.  If the cursor is to be
used to perform operations on behalf of a transaction, the cursor must
be opened and closed within the context of that single transaction.
Once <a href="../../api_c/dbc_close.html">DBcursor-&gt;c_close</a> has been called, the handle may not be accessed
again, regardless of the function's return.
</dl>
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/program/mt.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/program/namespace.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>