1<!--$Id: memp_set_flags.so,v 1.19 2007/06/07 15:30:46 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DB_MPOOLFILE-&gt;set_flags</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DB_MPOOLFILE-&gt;set_flags</b>
14</td>
15<td align=right>
16<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a>
17<a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db.h&gt;
23<p>
24int
25DB_MPOOLFILE-&gt;set_flags(DB_MPOOLFILE *mpf, u_int32_t flags, int onoff)
26<p>
27int
28DB_MPOOLFILE-&gt;get_flags(DB_MPOOLFILE *mpf, u_int32_t *flagsp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_MPOOLFILE-&gt;set_flags</b>
32<p>Configure a file in the cache.</p>
33<p>To set the flags for a particular database, call the
34DB_MPOOLFILE-&gt;set_flags method using the <a href="/api_c/mempfile_class.html">DB_MPOOLFILE</a> handle stored in
35the <b>mpf</b> field of the <a href="/api_c/db_class.html">DB</a> handle.</p>
36<p>The DB_MPOOLFILE-&gt;set_flags method
37returns a non-zero error value on failure
38and 0 on success.
39</p>
40<b>Parameters</b> <br>
41 <b>flags</b><ul compact><li>The <b>flags</b> parameter must be set by bitwise inclusively <b>OR</b>'ing together one or more
42of the following values:
43<br>
44<b><a name="DB_MPOOL_NOFILE">DB_MPOOL_NOFILE</a></b><ul compact><li>If set, no backing temporary file will be opened for the specified
45in-memory database, even if it expands to fill the entire cache.
46Attempts to create new database pages after the cache has been filled
47will fail.
48<p>The DB_MPOOL_NOFILE flag configures a file in the memory pool, not only
49operations performed using the specified <a href="/api_c/mempfile_class.html">DB_MPOOLFILE</a> handle.</p>
50<p>The DB_MPOOL_NOFILE flag may be used to configure Berkeley DB at any time during
51the life of the application.</p></ul>
52<b><a name="DB_MPOOL_UNLINK">DB_MPOOL_UNLINK</a></b><ul compact><li>If set, remove the file when the last reference to it is closed.
53<p>The DB_MPOOL_NOFILE flag configures a file in the memory pool, not only
54operations performed using the specified <a href="/api_c/mempfile_class.html">DB_MPOOLFILE</a> handle.</p>
55<p>The DB_MPOOL_UNLINK flag may be used to configure Berkeley DB at any time during
56the life of the application.</p></ul>
57<br></ul>
58 <b>onoff</b><ul compact><li>If <b>onoff</b> is
59zero,
60the specified flags are cleared;  otherwise they are set.</ul>
61<br>
62<hr size=1 noshade>
63<b>Description: DB_MPOOLFILE-&gt;get_flags</b>
64<p>The DB_MPOOLFILE-&gt;get_flags method returns the flags.</p>
65<p>The DB_MPOOLFILE-&gt;get_flags method may be called at any time during the life of the
66application.</p>
67<p>The DB_MPOOLFILE-&gt;get_flags method
68returns a non-zero error value on failure
69and 0 on success.
70</p>
71<b>Parameters</b> <br>
72 <b>flagsp</b><ul compact><li>The DB_MPOOLFILE-&gt;get_flags method returns  the
73flags in <b>flagsp</b>.</ul>
74<br>
75<hr size=1 noshade>
76<br><b>Class</b>
77<a href="/api_c/env_class.html">DB_ENV</a>, <a href="/api_c/mempfile_class.html">DB_MPOOLFILE</a>
78<br><b>See Also</b>
79<a href="/api_c/memp_list.html">Memory Pools and Related Methods</a>
80</tt>
81<table width="100%"><tr><td><br></td><td align=right>
82<a href="/api_c/api_core.html"><img src="/images/api.gif" alt="API"></a><a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a>
83</td></tr></table>
84<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
85</body>
86</html>
87