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