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>Db::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="db.html" title="Chapter 2. The Db Handle" />
11 <link rel="prev" href="dbset_partition_dirs.html" title="Db::set_partition_dirs()" />
12 <link rel="next" href="dbset_q_extentsize.html" title="Db::set_q_extentsize()" />
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">Db::set_priority()</th>
24 <td width="20%" align="left"><a accesskey="p" href="dbset_partition_dirs.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 2.
28 <td width="20%" align="right"> <a accesskey="n" href="dbset_q_extentsize.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="dbset_priority"></a>Db::set_priority()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
44 Db::set_priority(DB_CACHE_PRIORITY priority); </pre>
46 Set the cache priority for pages referenced by the
47 <a class="link" href="db.html" title="Chapter 2. The Db Handle">Db</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">Db::set_priority()</code> method is only
54 advisory, and does not guarantee pages will be treated in a specific
58 The <code class="methodname">Db::set_priority()</code> method may be called at any time during the
59 life of the application.
62 The <code class="methodname">Db::set_priority()</code> <span>
65 method either returns a non-zero error value or throws an
66 exception that encapsulates a non-zero error value on
67 failure, and returns 0 on success.
71 <div class="sect2" lang="en" xml:lang="en">
72 <div class="titlepage">
75 <h3 class="title"><a id="idp435208"></a>Parameters</h3>
79 <div class="sect3" lang="en" xml:lang="en">
80 <div class="titlepage">
83 <h4 class="title"><a id="idp434560"></a>priority</h4>
88 The <span class="bold"><strong>priority</strong></span> parameter must be set to
89 one of the following values:
91 <div class="itemizedlist">
94 <p><a id="set_priority_DB_PRIORITY_VERY_LOW"></a>
95 <code class="literal">DB_PRIORITY_VERY_LOW</code>
98 The lowest priority: pages are the most likely to be discarded.
102 <p><a id="set_priority_DB_PRIORITY_LOW"></a>
103 <code class="literal">DB_PRIORITY_LOW</code>
106 The next lowest priority.
110 <p><a id="set_priority_DB_PRIORITY_DEFAULT"></a>
111 <code class="literal">DB_PRIORITY_DEFAULT</code>
114 The default priority.
118 <p><a id="set_priority_DB_PRIORITY_HIGH"></a>
119 <code class="literal">DB_PRIORITY_HIGH</code>
122 The next highest priority.
126 <p><a id="set_priority_DB_PRIORITY_VERY_HIGH"></a>
127 <code class="literal">DB_PRIORITY_VERY_HIGH</code>
130 The highest priority: pages are the least likely to be discarded.
137 <div class="sect2" lang="en" xml:lang="en">
138 <div class="titlepage">
141 <h3 class="title"><a id="idp444920"></a>Class</h3>
146 <a class="link" href="db.html" title="Chapter 2. The Db Handle">Db</a>
149 <div class="sect2" lang="en" xml:lang="en">
150 <div class="titlepage">
153 <h3 class="title"><a id="idp397256"></a>See Also</h3>
158 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a>
162 <div class="navfooter">
164 <table width="100%" summary="Navigation footer">
166 <td width="40%" align="left"><a accesskey="p" href="dbset_partition_dirs.html">Prev</a> </td>
167 <td width="20%" align="center">
168 <a accesskey="u" href="db.html">Up</a>
170 <td width="40%" align="right"> <a accesskey="n" href="dbset_q_extentsize.html">Next</a></td>
173 <td width="40%" align="left" valign="top">Db::set_partition_dirs() </td>
174 <td width="20%" align="center">
175 <a accesskey="h" href="index.html">Home</a>
177 <td width="40%" align="right" valign="top"> Db::set_q_extentsize()</td>