Debian Codegraph @

docs/api_reference/CXX/mempset_flags.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>DbMpoolFile::set_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="memp.html" title="Chapter 9.  The DbMpoolFile Handle" />
11 <link rel="prev" href="mempset_fileid.html" title="DbMpoolFile::set_fileid()" />
12 <link rel="next" href="mempset_ftype.html" title="DbMpoolFile::set_ftype()" />
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">DbMpoolFile::set_flags()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="mempset_fileid.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 9. 
26 The DbMpoolFile Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="mempset_ftype.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="mempset_flags"></a>DbMpoolFile::set_flags()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbMpoolFile::set_flags(u_int32_t flags, bool onoff); </pre>
45 <p>
46 Configure a file in the cache.
47 </p>
48 <p>
49 To set the flags for a particular database, call the
50 <code class="methodname">DbMpoolFile::set_flags()</code> method using the
51 <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a> handle stored
52 in the <span class="bold"><strong>mpf</strong></span> field of the
53 <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a> handle.
54 </p>
55 <p>
56 The <code class="methodname">DbMpoolFile::set_flags()</code> <span>
57
58 <span>
59 method either returns a non-zero error value or throws an
60 exception that encapsulates a non-zero error value on
61 failure, and returns 0 on success.
62 </span>
63 </span>
64 </p>
65 <div class="sect2" lang="en" xml:lang="en">
66 <div class="titlepage">
67 <div>
68 <div>
69 <h3 class="title"><a id="idp9052968"></a>Parameters</h3>
70 </div>
71 </div>
72 </div>
73 <div class="sect3" lang="en" xml:lang="en">
74 <div class="titlepage">
75 <div>
76 <div>
77 <h4 class="title"><a id="idp9052320"></a>flags</h4>
78 </div>
79 </div>
80 </div>
81 <p>
82 The <span class="bold"><strong>flags</strong></span> parameter must be set by
83 bitwise inclusively <span class="bold"><strong>OR</strong></span>'ing together
84 one or more of the following values:
85 </p>
86 <div class="itemizedlist">
87 <ul type="disc">
88 <li>
89 <p><a id="mpool_set_flags_DB_MPOOL_NOFILE"></a>
90 <code class="literal">DB_MPOOL_NOFILE</code>
91 </p>
92 <p>
93 If set, no backing temporary file will be opened for the specified
94 in-memory database, even if it expands to fill the entire cache.
95 Attempts to create new database pages after the cache has been filled
96 will fail.
97 </p>
98 <p>
99 The <code class="literal">DB_MPOOL_NOFILE</code> flag configures a file in the cache, not
100 only operations performed using the specified
101 <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a> handle.
102 </p>
103 <p>
104 The <code class="literal">DB_MPOOL_NOFILE</code> flag may be used to configure Berkeley DB at any
105 time during the life of the application.
106 </p>
107 </li>
108 <li>
109 <p>
110 <code class="literal">DB_MPOOL_UNLINK</code>
111 </p>
112 <p>
113 If set, remove the file when the last reference to it is closed.
114 </p>
115 <p>
116 The <code class="literal">DB_MPOOL_ULINK</code> flag configures a file in the cache, not
117 only operations performed using the specified
118 <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a> handle.
119 </p>
120 <p>
121 The <code class="literal">DB_MPOOL_ULINK</code> flag may be used to configure Berkeley DB at any
122 time during the life of the application.
123 </p>
124 </li>
125 </ul>
126 </div>
127 </div>
128 <div class="sect3" lang="en" xml:lang="en">
129 <div class="titlepage">
130 <div>
131 <div>
132 <h4 class="title"><a id="idp9062640"></a>onoff</h4>
133 </div>
134 </div>
135 </div>
136 <p>
137 If <span class="bold"><strong>onoff</strong></span> is zero, the specified flags
138 are cleared; otherwise they are set.
139 </p>
140 </div>
141 </div>
142 <div class="sect2" lang="en" xml:lang="en">
143 <div class="titlepage">
144 <div>
145 <div>
146 <h3 class="title"><a id="idp9057232"></a>Class</h3>
147 </div>
148 </div>
149 </div>
150 <p>
151 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>, <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a>
152 </p>
153 </div>
154 <div class="sect2" lang="en" xml:lang="en">
155 <div class="titlepage">
156 <div>
157 <div>
158 <h3 class="title"><a id="idp9065544"></a>See Also</h3>
159 </div>
160 </div>
161 </div>
162 <p>
163 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a>
164 </p>
165 </div>
166 </div>
167 <div class="navfooter">
168 <hr />
169 <table width="100%" summary="Navigation footer">
170 <tr>
171 <td width="40%" align="left"><a accesskey="p" href="mempset_fileid.html">Prev</a> </td>
172 <td width="20%" align="center">
173 <a accesskey="u" href="memp.html">Up</a>
174 </td>
175 <td width="40%" align="right"> <a accesskey="n" href="mempset_ftype.html">Next</a></td>
176 </tr>
177 <tr>
178 <td width="40%" align="left" valign="top">DbMpoolFile::set_fileid() </td>
179 <td width="20%" align="center">
180 <a accesskey="h" href="index.html">Home</a>
181 </td>
182 <td width="40%" align="right" valign="top"> DbMpoolFile::set_ftype()</td>
183 </tr>
184 </table>
185 </div>
186 </body>
187 </html>