memp_fput.html   [plain text]


<!--$Id: memp_fput.so,v 10.35 2007/10/26 15:01:55 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DbMpoolFile::put</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DbMpoolFile::put</b>
</td>
<td align=right>
<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></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db_cxx.h&gt;
<p>
int
DbMpoolFile::put(void *pgaddr, DB_CACHE_PRIORITY priority, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DbMpoolFile::put</b>
<p>The DbMpoolFile::put method returns a reference to a page in the cache,
setting the priority of the page as specified by the <b>priority</b>
parameter.</p>
<p>The DbMpoolFile::put method
either returns a non-zero error value
or throws an exception that encapsulates a non-zero error value on
failure, and returns 0 on success.
</p>
<b>Parameters</b> <br>
 <b>flags</b><ul compact><li>The <b>flags</b> parameter is currently unused, and must be set to 0.</ul>
 <b>pgaddr</b><ul compact><li>The <b>pgaddr</b> parameter is the address of the page to be returned
to the cache.  The <b>pgaddr</b> parameter must be a value previously
returned by the <a href="../api_cxx/memp_fget.html">DbMpoolFile::get</a> method.</ul>
 <b>priority</b><ul compact><li>Set the page's <b>priority</b> as follows:
<br>
<b><a name="DB_PRIORITY_UNCHANGED">DB_PRIORITY_UNCHANGED</a></b><ul compact><li>The priority is unchanged.</ul>
<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>
<b><a name="DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></b><ul compact><li>The next lowest priority.</ul>
<b><a name="DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></b><ul compact><li>The default priority.</ul>
<b><a name="DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></b><ul compact><li>The next highest priority.</ul>
<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>
<br></ul>
<br>
<br><b>Errors</b>
<p>The DbMpoolFile::put method
may fail and throw
<a href="../api_cxx/except_class.html">DbException</a>,
encapsulating one of the following non-zero errors, or return one of
the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/mempfile_class.html">DbMpoolFile</a>
<br><b>See Also</b>
<a href="../api_cxx/memp_list.html">Memory Pools and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<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>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>