• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/CXX/
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">
4  <head>
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()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Db::set_priority()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="dbset_partition_dirs.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 2. 
23                The Db Handle
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="dbset_q_extentsize.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="dbset_priority"></a>Db::set_priority()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40int
41Db::set_priority(DB_CACHE_PRIORITY priority); </pre>
42      <p>
43            Set the cache priority for pages referenced by the 
44            <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  handle.
45    </p>
46      <p>
47         The priority of a page biases the replacement algorithm to be more or
48         less likely to discard a page when space is needed in the buffer pool.
49         The bias is temporary, and pages will eventually be discarded if they
50         are not referenced again.  The <code class="methodname">Db::set_priority()</code> method is only
51         advisory, and does not guarantee pages will be treated in a specific
52         way.
53    </p>
54      <p>
55         The <code class="methodname">Db::set_priority()</code> method may be called at any time during the
56         life of the application.
57    </p>
58      <p>
59         The <code class="methodname">Db::set_priority()</code> <span>
60            
61            <span>
62                method either returns a non-zero error value or throws an
63                exception that encapsulates a non-zero error value on
64                failure, and returns 0 on success.
65            </span>
66        </span>
67    </p>
68      <div class="sect2" lang="en" xml:lang="en">
69        <div class="titlepage">
70          <div>
71            <div>
72              <h3 class="title"><a id="id1650160"></a>Parameters</h3>
73            </div>
74          </div>
75        </div>
76        <div class="sect3" lang="en" xml:lang="en">
77          <div class="titlepage">
78            <div>
79              <div>
80                <h4 class="title"><a id="id1650481"></a>priority</h4>
81              </div>
82            </div>
83          </div>
84          <p>
85                          The <span class="bold"><strong>priority</strong></span> parameter must be set to
86                          one of the following values:
87                     </p>
88          <div class="itemizedlist">
89            <ul type="disc">
90              <li>
91                <p><a id="set_priority_DB_PRIORITY_VERY_LOW"></a>
92                  <code class="literal">DB_PRIORITY_VERY_LOW</code>
93            </p>
94                <p>
95                 The lowest priority: pages are the most likely to be discarded.
96            </p>
97              </li>
98              <li>
99                <p><a id="set_priority_DB_PRIORITY_LOW"></a>
100                  <code class="literal">DB_PRIORITY_LOW</code>
101            </p>
102                <p>
103                The next lowest priority.
104            </p>
105              </li>
106              <li>
107                <p><a id="set_priority_DB_PRIORITY_DEFAULT"></a>
108                  <code class="literal">DB_PRIORITY_DEFAULT</code>
109            </p>
110                <p>
111                The default priority.
112            </p>
113              </li>
114              <li>
115                <p><a id="set_priority_DB_PRIORITY_HIGH"></a>
116                  <code class="literal">DB_PRIORITY_HIGH</code>
117            </p>
118                <p>
119                The next highest priority.
120            </p>
121              </li>
122              <li>
123                <p><a id="set_priority_DB_PRIORITY_VERY_HIGH"></a>
124                  <code class="literal">DB_PRIORITY_VERY_HIGH</code>
125            </p>
126                <p>
127                 The highest priority: pages are the least likely to be discarded.
128            </p>
129              </li>
130            </ul>
131          </div>
132        </div>
133      </div>
134      <div class="sect2" lang="en" xml:lang="en">
135        <div class="titlepage">
136          <div>
137            <div>
138              <h3 class="title"><a id="id1650161"></a>Class</h3>
139            </div>
140          </div>
141        </div>
142        <p>
143                <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>  
144            </p>
145      </div>
146      <div class="sect2" lang="en" xml:lang="en">
147        <div class="titlepage">
148          <div>
149            <div>
150              <h3 class="title"><a id="id1650191"></a>See Also</h3>
151            </div>
152          </div>
153        </div>
154        <p>
155                     <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> 
156                </p>
157      </div>
158    </div>
159    <div class="navfooter">
160      <hr />
161      <table width="100%" summary="Navigation footer">
162        <tr>
163          <td width="40%" align="left"><a accesskey="p" href="dbset_partition_dirs.html">Prev</a> </td>
164          <td width="20%" align="center">
165            <a accesskey="u" href="db.html">Up</a>
166          </td>
167          <td width="40%" align="right"> <a accesskey="n" href="dbset_q_extentsize.html">Next</a></td>
168        </tr>
169        <tr>
170          <td width="40%" align="left" valign="top">Db::set_partition_dirs() </td>
171          <td width="20%" align="center">
172            <a accesskey="h" href="index.html">Home</a>
173          </td>
174          <td width="40%" align="right" valign="top"> Db::set_q_extentsize()</td>
175        </tr>
176      </table>
177    </div>
178  </body>
179</html>
180