1<!--$Id: memp_fput.so,v 10.35 2007/10/26 15:01:55 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: DbMpoolFile::put</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>DbMpoolFile::put</b>
14</td>
15<td align=right>
16<a href="/api_cxx/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_cxx.h&gt;
23<p>
24int
25DbMpoolFile::put(void *pgaddr, DB_CACHE_PRIORITY priority, u_int32_t flags);
26</pre></b>
27<hr size=1 noshade>
28<b>Description: DbMpoolFile::put</b>
29<p>The DbMpoolFile::put method returns a reference to a page in the cache,
30setting the priority of the page as specified by the <b>priority</b>
31parameter.</p>
32<p>The DbMpoolFile::put method
33either returns a non-zero error value
34or throws an exception that encapsulates a non-zero error value on
35failure, and returns 0 on success.
36</p>
37<b>Parameters</b> <br>
38 <b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
39 <b>pgaddr</b><ul compact><li>The <b>pgaddr</b> parameter is the address of the page to be returned
40to the cache.  The <b>pgaddr</b> parameter must be a value previously
41returned by the <a href="/api_cxx/memp_fget.html">DbMpoolFile::get</a> method.</ul>
42 <b>priority</b><ul compact><li>Set the page's <b>priority</b> as follows:
43<br>
44<b><a name="DB_PRIORITY_UNCHANGED">DB_PRIORITY_UNCHANGED</a></b><ul compact><li>The priority is unchanged.</ul>
45<b><a name="DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a></b><ul compact><li>The lowest priority: pages are the most likely to be discarded.</ul>
46<b><a name="DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></b><ul compact><li>The next lowest priority.</ul>
47<b><a name="DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></b><ul compact><li>The default priority.</ul>
48<b><a name="DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></b><ul compact><li>The next highest priority.</ul>
49<b><a name="DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a></b><ul compact><li>The highest priority: pages are the least likely to be discarded.</ul>
50<br></ul>
51<br>
52<br><b>Errors</b>
53<p>The DbMpoolFile::put method
54may fail and throw
55<a href="/api_cxx/except_class.html">DbException</a>,
56encapsulating one of the following non-zero errors, or return one of
57the following non-zero errors:</p>
58<br>
59<b>EINVAL</b><ul compact><li>An
60invalid flag value or parameter was specified.</ul>
61<br>
62<hr size=1 noshade>
63<br><b>Class</b>
64<a href="/api_cxx/env_class.html">DbEnv</a>, <a href="/api_cxx/mempfile_class.html">DbMpoolFile</a>
65<br><b>See Also</b>
66<a href="/api_cxx/memp_list.html">Memory Pools and Related Methods</a>
67</tt>
68<table width="100%"><tr><td><br></td><td align=right>
69<a href="/api_cxx/api_core.html"><img src="/images/api.gif" alt="API"></a><a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a>
70</td></tr></table>
71<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
72</body>
73</html>
74