Debian Codegraph @

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