1<!--$Id: dbc_set_priority.so,v 1.3 2007/05/22 18:06:05 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: DBcursor->set_priority</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>DBcursor->set_priority</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 25DbCursor->set_priority(DBC *DbCursor, DB_CACHE_PRIORITY priority); 26<p> 27int 28DbCursor->get_priority(DBC *DbCursor, DB_CACHE_PRIORITY *priorityp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: DBcursor->set_priority</b> 32<p>Set the cache priority for pages referenced by the 33<a href="../api_c/dbc_class.html">DBC</a> 34handle.</p> 35<p>The priority of a page biases the replacement algorithm to be more or 36less likely to discard a page when space is needed in the buffer pool. 37The bias is temporary, and pages will eventually be discarded if they 38are not referenced again. The DBcursor->set_priority method is only advisory, and does 39not guarantee pages will be treated in a specific way.</p> 40<p>The DBcursor->set_priority method may be called at any time during the life of the 41application.</p> 42<p>The DBcursor->set_priority method 43returns a non-zero error value on failure 44and 0 on success. 45</p> 46<b>Parameters</b> <br> 47 <b>priority</b><ul compact><li>The <b>priority</b> parameter must be set to one of the following 48values: 49<br> 50<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> 51<b><a name="DB_PRIORITY_LOW">DB_PRIORITY_LOW</a></b><ul compact><li>The next lowest priority.</ul> 52<b><a name="DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a></b><ul compact><li>The default priority.</ul> 53<b><a name="DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a></b><ul compact><li>The next highest priority.</ul> 54<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> 55<br></ul> 56<br> 57<hr size=1 noshade> 58<b>Description: DBcursor->get_priority</b> 59<p>The DBcursor->get_priority method returns the cache priority for pages referenced by the 60<a href="../api_c/dbc_class.html">DBC</a> 61handle.</p> 62<p>The DBcursor->get_priority method may be called at any time during the life of the 63application.</p> 64<p>The DBcursor->get_priority method 65returns a non-zero error value on failure 66and 0 on success. 67</p> 68<b>Parameters</b> <br> 69 <b>priorityp</b><ul compact><li>The DBcursor->get_priority method returns a reference to the 70cache priority for pages referenced by the 71<a href="../api_c/dbc_class.html">DBC</a> 72handle in <b>priorityp</b>.</ul> 73<br> 74<hr size=1 noshade> 75<br><b>Class</b> 76<a href="../api_c/dbc_class.html">DBC</a> 77<br><b>See Also</b> 78<a href="../api_c/dbc_list.html">Database Cursors and Related Methods</a> 79</tt> 80<table width="100%"><tr><td><br></td><td align=right> 81<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> 82</td></tr></table> 83<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 84</body> 85</html> 86