Debian Codegraph @

docs/api_reference/CXX/set_open_flags_parameter.html

raw symbols SCIP
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>set_open_flags</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="configuration_reference.html" title="Appendix B. DB_CONFIG Parameter Reference" />
11 <link rel="prev" href="set_mp_mmapsize_parameter.html" title="set_mp_mmapsize" />
12 <link rel="next" href="set_shm_key_parameter.html" title="set_shm_key" />
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">set_open_flags</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="set_mp_mmapsize_parameter.html">Prev</a> </td>
25 <th width="60%" align="center">Appendix B. DB_CONFIG Parameter Reference</th>
26 <td width="20%" align="right"> <a accesskey="n" href="set_shm_key_parameter.html">Next</a></td>
27 </tr>
28 </table>
29 <hr />
30 </div>
31 <div class="sect1" lang="en" xml:lang="en">
32 <div class="titlepage">
33 <div>
34 <div>
35 <h2 class="title" style="clear: both"><a id="set_open_flags_parameter"></a>set_open_flags</h2>
36 </div>
37 </div>
38 </div>
39 <p>
40 Initializes specific subsystems of the Berkeley DB environment.
41 </p>
42 <p>
43 The syntax of the entry in the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> is a single line
44 with the string <code class="literal">set_open_flags</code>, one or
45 more whitespace characters, the method flag parameter as a
46 string, optionally one or more whitespace characters, and
47 the string <code class="literal">on</code> or <code class="literal">off</code>.
48 If the optional string is omitted, the default is
49 <code class="literal">on</code>; for example,
50 <code class="literal">set_open_flags DB_INIT_REP</code> or
51 <code class="literal">set_open_flags DB_INIT_REP on</code>. Because
52 the DB_CONFIG file is read when the database environment is
53 opened, it will silently overrule configuration done before
54 that time.
55 </p>
56 <p>
57 The method flag parameters are as follows:
58 </p>
59 <div class="itemizedlist">
60 <ul type="disc">
61 <li>
62 DB_INIT_REP
63 <p>
64 Enables/disables DB_INIT_REP in the DB_ENV-&gt;open method. For example:
65 </p><pre class="programlisting">set_open_flags DB_INIT_REP on</pre><p>
66 This enables initializing the replication subsystem. This
67 subsystem should be used whenever an application plans on
68 using replication. This setting overwrites the DB_INIT_REP
69 flag passed from the application's DB_ENV-&gt;open
70 method.
71 </p></li>
72 <li>
73 DB_PRIVATE
74 <p>
75 Enables/disables DB_PRIVATE in the DB_ENV-&gt;open method. For example:
76 </p><pre class="programlisting">set_open_flags DB_PRIVATE on</pre><p>
77 This enables region memory allocation from the heap instead of from memory backed by the filesystem or
78 system shared memory.
79 This flag implies the environment will only be accessed by a single process (although that
80 process may be multithreaded). This flag has two effects on the Berkeley DB environment.
81 First, all underlying data structures are allocated from per-process memory instead of from
82 shared memory that is accessible to more than a single process. Second, mutexes are only
83 configured to work between threads.
84 This setting overwrites the DB_PRIVATE flag passed from the application's DB_ENV-&gt;open method.
85 </p></li>
86 <li>
87 DB_THREAD
88 <p>
89 Enables/disables DB_THREAD in the DB_ENV-&gt;open method. For example:
90 </p><pre class="programlisting">set_open_flags DB_THREAD on</pre><p>This enables the DB_ENV handle returned by the DB_ENV-&gt;open method to be free-threaded; that is, concurrently usable by multiple threads in the address space.
91 This setting overwrites the DB_THREAD flag passed from the application's DB_ENV-&gt;open method.</p></li>
92 </ul>
93 </div>
94 </div>
95 <div class="navfooter">
96 <hr />
97 <table width="100%" summary="Navigation footer">
98 <tr>
99 <td width="40%" align="left"><a accesskey="p" href="set_mp_mmapsize_parameter.html">Prev</a> </td>
100 <td width="20%" align="center">
101 <a accesskey="u" href="configuration_reference.html">Up</a>
102 </td>
103 <td width="40%" align="right"> <a accesskey="n" href="set_shm_key_parameter.html">Next</a></td>
104 </tr>
105 <tr>
106 <td width="40%" align="left" valign="top">set_mp_mmapsize </td>
107 <td width="20%" align="center">
108 <a accesskey="h" href="index.html">Home</a>
109 </td>
110 <td width="40%" align="right" valign="top"> set_shm_key</td>
111 </tr>
112 </table>
113 </div>
114 </body>
115 </html>