1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DBcursor->set_priority()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="dbc.html" title="Chapter 3. The DBcursor Handle" />
11 <link rel="prev" href="dbcput.html" title="DBcursor->put()" />
12 <link rel="next" href="dbt.html" title="Chapter 4. The DBT Handle" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">DBcursor->set_priority()</th>
24 <td width="20%" align="left"><a accesskey="p" href="dbcput.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 3.
28 <td width="20%" align="right"> <a accesskey="n" href="dbt.html">Next</a></td>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
37 <h2 class="title" style="clear: both"><a id="dbcset_priority"></a>DBcursor->set_priority()</h2>
41 <pre class="programlisting">#include <db.h>
44 DBcursor->set_priority(DBC *DbCursor, DB_CACHE_PRIORITY priority); </pre>
46 Set the cache priority for pages referenced by the
47 <a class="link" href="dbc.html" title="Chapter 3. The DBcursor Handle">DBcursor</a> handle.
50 The priority of a page biases the replacement algorithm to be more or
51 less likely to discard a page when space is needed in the buffer pool.
52 The bias is temporary, and pages will eventually be discarded if they
53 are not referenced again. The <code class="methodname">DBcursor->set_priority()</code> method is
54 only advisory, and does not guarantee pages will be treated in a
58 The <code class="methodname">DBcursor->set_priority()</code> method may be called at any time during
59 the life of the application.
62 The <code class="methodname">DBcursor->set_priority()</code> <span>
64 method returns a non-zero error value on failure and 0 on success.
69 <div class="sect2" lang="en" xml:lang="en">
70 <div class="titlepage">
73 <h3 class="title"><a id="idp59003712"></a>Parameters</h3>
77 <div class="sect3" lang="en" xml:lang="en">
78 <div class="titlepage">
81 <h4 class="title"><a id="idp59022600"></a>priority</h4>
86 The <span class="bold"><strong>priority</strong></span> parameter must be set to
87 one of the following values:
89 <div class="itemizedlist">
92 <p><a id="dbcset_priority_DB_PRIORITY_VERY_LOW"></a>
93 <code class="literal">DB_PRIORITY_VERY_LOW</code>
96 The lowest priority: pages are the most likely to be discarded.
100 <p><a id="dbcset_priority_DB_PRIORITY_LOW"></a>
101 <code class="literal">DB_PRIORITY_LOW</code>
104 The next lowest priority.
108 <p><a id="dbcset_priority_DB_PRIORITY_DEFAULT"></a>
109 <code class="literal">DB_PRIORITY_DEFAULT</code>
112 The default priority.
116 <p><a id="dbcset_priority_DB_PRIORITY_HIGH"></a>
117 <code class="literal">DB_PRIORITY_HIGH</code>
120 The next highest priority.
124 <p><a id="dbcset_priority_DB_PRIORITY_VERY_HIGH"></a>
125 <code class="literal">DB_PRIORITY_VERY_HIGH</code>
128 The highest priority: pages are the least likely to be discarded.
135 <div class="sect2" lang="en" xml:lang="en">
136 <div class="titlepage">
139 <h3 class="title"><a id="idp59033464"></a>Class</h3>
144 <a class="link" href="dbc.html" title="Chapter 3. The DBcursor Handle">DBcursor</a>
147 <div class="sect2" lang="en" xml:lang="en">
148 <div class="titlepage">
151 <h3 class="title"><a id="idp59034544"></a>See Also</h3>
156 <a class="xref" href="dbc.html#dbclist" title="Database Cursors and Related Methods">Database Cursors and Related Methods</a>
160 <div class="navfooter">
162 <table width="100%" summary="Navigation footer">
164 <td width="40%" align="left"><a accesskey="p" href="dbcput.html">Prev</a> </td>
165 <td width="20%" align="center">
166 <a accesskey="u" href="dbc.html">Up</a>
168 <td width="40%" align="right"> <a accesskey="n" href="dbt.html">Next</a></td>
171 <td width="40%" align="left" valign="top">DBcursor->put() </td>
172 <td width="20%" align="center">
173 <a accesskey="h" href="index.html">Home</a>
175 <td width="40%" align="right" valign="top"> Chapter 4.