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: DB_MPOOLFILE->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>DB_MPOOLFILE->put</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 <db.h> 23<p> 24int 25DB_MPOOLFILE->put(DB_MPOOLFILE *mpf, 26 void *pgaddr, DB_CACHE_PRIORITY priority, u_int32_t flags); 27</pre></b> 28<hr size=1 noshade> 29<b>Description: DB_MPOOLFILE->put</b> 30<p>The DB_MPOOLFILE->put method returns a reference to a page in the cache, 31setting the priority of the page as specified by the <b>priority</b> 32parameter.</p> 33<p>The DB_MPOOLFILE->put method 34returns a non-zero error value on failure 35and 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_c/memp_fget.html">DB_MPOOLFILE->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 DB_MPOOLFILE->put method 54may fail and return one of the following non-zero errors:</p> 55<br> 56<b>EINVAL</b><ul compact><li>An 57invalid flag value or parameter was specified.</ul> 58<br> 59<hr size=1 noshade> 60<br><b>Class</b> 61<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> 62<br><b>See Also</b> 63<a href="../api_c/memp_list.html">Memory Pools and Related Methods</a> 64</tt> 65<table width="100%"><tr><td><br></td><td align=right> 66<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> 67</td></tr></table> 68<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 69</body> 70</html> 71