• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/db-4.8.30/docs/api_reference/C/
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-&gt;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-&gt;set_partition_dirs()" />
12    <link rel="next" href="dbset_q_extentsize.html" title="DB-&gt;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-&gt;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-&gt;set_priority()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB-&gt;set_priority(DB *db, 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-&gt;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-&gt;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-&gt;set_priority()</code> <span>
60            <span>
61                  method returns a non-zero error value on failure and 0 on success.
62            </span>
63            
64        </span>
65    </p>
66      <div class="sect2" lang="en" xml:lang="en">
67        <div class="titlepage">
68          <div>
69            <div>
70              <h3 class="title"><a id="id1649442"></a>Parameters</h3>
71            </div>
72          </div>
73        </div>
74        <div class="sect3" lang="en" xml:lang="en">
75          <div class="titlepage">
76            <div>
77              <div>
78                <h4 class="title"><a id="id1649128"></a>priority</h4>
79              </div>
80            </div>
81          </div>
82          <p>
83                          The <span class="bold"><strong>priority</strong></span> parameter must be set to
84                          one of the following values:
85                     </p>
86          <div class="itemizedlist">
87            <ul type="disc">
88              <li>
89                <p><a id="set_priority_DB_PRIORITY_VERY_LOW"></a>
90                  <code class="literal">DB_PRIORITY_VERY_LOW</code>
91            </p>
92                <p>
93                 The lowest priority: pages are the most likely to be discarded.
94            </p>
95              </li>
96              <li>
97                <p><a id="set_priority_DB_PRIORITY_LOW"></a>
98                  <code class="literal">DB_PRIORITY_LOW</code>
99            </p>
100                <p>
101                The next lowest priority.
102            </p>
103              </li>
104              <li>
105                <p><a id="set_priority_DB_PRIORITY_DEFAULT"></a>
106                  <code class="literal">DB_PRIORITY_DEFAULT</code>
107            </p>
108                <p>
109                The default priority.
110            </p>
111              </li>
112              <li>
113                <p><a id="set_priority_DB_PRIORITY_HIGH"></a>
114                  <code class="literal">DB_PRIORITY_HIGH</code>
115            </p>
116                <p>
117                The next highest priority.
118            </p>
119              </li>
120              <li>
121                <p><a id="set_priority_DB_PRIORITY_VERY_HIGH"></a>
122                  <code class="literal">DB_PRIORITY_VERY_HIGH</code>
123            </p>
124                <p>
125                 The highest priority: pages are the least likely to be discarded.
126            </p>
127              </li>
128            </ul>
129          </div>
130        </div>
131      </div>
132      <div class="sect2" lang="en" xml:lang="en">
133        <div class="titlepage">
134          <div>
135            <div>
136              <h3 class="title"><a id="id1649530"></a>Class</h3>
137            </div>
138          </div>
139        </div>
140        <p>
141                <a class="link" href="db.html" title="Chapter��2.�� The DB Handle">DB</a>  
142            </p>
143      </div>
144      <div class="sect2" lang="en" xml:lang="en">
145        <div class="titlepage">
146          <div>
147            <div>
148              <h3 class="title"><a id="id1649438"></a>See Also</h3>
149            </div>
150          </div>
151        </div>
152        <p>
153                     <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> 
154                </p>
155      </div>
156    </div>
157    <div class="navfooter">
158      <hr />
159      <table width="100%" summary="Navigation footer">
160        <tr>
161          <td width="40%" align="left"><a accesskey="p" href="dbset_partition_dirs.html">Prev</a>��</td>
162          <td width="20%" align="center">
163            <a accesskey="u" href="db.html">Up</a>
164          </td>
165          <td width="40%" align="right">��<a accesskey="n" href="dbset_q_extentsize.html">Next</a></td>
166        </tr>
167        <tr>
168          <td width="40%" align="left" valign="top">DB-&gt;set_partition_dirs()��</td>
169          <td width="20%" align="center">
170            <a accesskey="h" href="index.html">Home</a>
171          </td>
172          <td width="40%" align="right" valign="top">��DB-&gt;set_q_extentsize()</td>
173        </tr>
174      </table>
175    </div>
176  </body>
177</html>
178