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