Debian Codegraph @

docs/api_reference/CXX/mempset_priority.html

raw symbols SCIP
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>DbMpoolFile::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="memp.html" title="Chapter 9.  The DbMpoolFile Handle" />
11 <link rel="prev" href="mempset_pgcookie.html" title="DbMpoolFile::set_pgcookie()" />
12 <link rel="next" href="mutex.html" title="Chapter 10.  Mutex Methods" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DbMpoolFile::set_priority()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="mempset_pgcookie.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 9. 
26 The DbMpoolFile Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="mutex.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="mempset_priority"></a>DbMpoolFile::set_priority()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbMpoolFile::set_priority(DB_CACHE_PRIORITY priority); </pre>
45 <p>
46 Set the cache priority for pages referenced by the
47 <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a> handle.
48 </p>
49 <p>
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 cache.
52 The bias is temporary, and pages will eventually be discarded if they
53 are not referenced again. The <code class="methodname">DbMpoolFile::set_priority()</code> method is
54 only advisory, and does not guarantee pages will be treated in a
55 specific way.
56 </p>
57 <p>
58 To set the priority for the pages belonging to a particular database,
59 call the <code class="methodname">DbMpoolFile::set_priority()</code> method using the
60 <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a> handle
61 returned by the <a class="xref" href="dbget_mpf.html" title="Db::get_mpf()">Db::get_mpf()</a> method.
62 </p>
63 <p>
64 The <code class="methodname">DbMpoolFile::set_priority()</code> method configures a file in the
65 cache, not only operations performed using the specified
66 <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a> handle.
67 </p>
68 <p>
69 The <code class="methodname">DbMpoolFile::set_priority()</code> method may be called at any time
70 during the life of the application.
71 </p>
72 <p>
73 The <code class="methodname">DbMpoolFile::set_priority()</code> <span>
74
75 <span>
76 method either returns a non-zero error value or throws an
77 exception that encapsulates a non-zero error value on
78 failure, and returns 0 on success.
79 </span>
80 </span>
81 </p>
82 <div class="sect2" lang="en" xml:lang="en">
83 <div class="titlepage">
84 <div>
85 <div>
86 <h3 class="title"><a id="idp9109384"></a>Parameters</h3>
87 </div>
88 </div>
89 </div>
90 <div class="sect3" lang="en" xml:lang="en">
91 <div class="titlepage">
92 <div>
93 <div>
94 <h4 class="title"><a id="idp9108736"></a>priority</h4>
95 </div>
96 </div>
97 </div>
98 <p>
99 The <span class="bold"><strong>priority</strong></span> parameter must be set to
100 one of the following values:
101 </p>
102 <div class="itemizedlist">
103 <ul type="disc">
104 <li>
105 <p>
106 <code class="literal">DB_PRIORITY_VERY_LOW</code>
107 </p>
108 <p>
109 The lowest priority: pages are the most likely to be discarded.
110 </p>
111 </li>
112 <li>
113 <p>
114 <code class="literal">DB_PRIORITY_LOW</code>
115 </p>
116 <p>
117 The next lowest priority.
118 </p>
119 </li>
120 <li>
121 <p>
122 <code class="literal">DB_PRIORITY_DEFAULT</code>
123 </p>
124 <p>
125 The default priority.
126 </p>
127 </li>
128 <li>
129 <p>
130 <code class="literal">DB_PRIORITY_HIGH</code>
131 </p>
132 <p>
133 The next highest priority.
134 </p>
135 </li>
136 <li>
137 <p>
138 <code class="literal">DB_PRIORITY_VERY_HIGH</code>
139 </p>
140 <p>
141 The highest priority: pages are the least likely to be discarded.
142 </p>
143 </li>
144 </ul>
145 </div>
146 </div>
147 </div>
148 <div class="sect2" lang="en" xml:lang="en">
149 <div class="titlepage">
150 <div>
151 <div>
152 <h3 class="title"><a id="idp9124608"></a>Class</h3>
153 </div>
154 </div>
155 </div>
156 <p>
157 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>, <a class="link" href="memp.html" title="Chapter 9.  The DbMpoolFile Handle">DbMpoolFile</a>
158 </p>
159 </div>
160 <div class="sect2" lang="en" xml:lang="en">
161 <div class="titlepage">
162 <div>
163 <div>
164 <h3 class="title"><a id="idp9104288"></a>See Also</h3>
165 </div>
166 </div>
167 </div>
168 <p>
169 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a>
170 </p>
171 </div>
172 </div>
173 <div class="navfooter">
174 <hr />
175 <table width="100%" summary="Navigation footer">
176 <tr>
177 <td width="40%" align="left"><a accesskey="p" href="mempset_pgcookie.html">Prev</a> </td>
178 <td width="20%" align="center">
179 <a accesskey="u" href="memp.html">Up</a>
180 </td>
181 <td width="40%" align="right"> <a accesskey="n" href="mutex.html">Next</a></td>
182 </tr>
183 <tr>
184 <td width="40%" align="left" valign="top">DbMpoolFile::set_pgcookie() </td>
185 <td width="20%" align="center">
186 <a accesskey="h" href="index.html">Home</a>
187 </td>
188 <td width="40%" align="right" valign="top"> Chapter 10. 
189 Mutex Methods
190 </td>
191 </tr>
192 </table>
193 </div>
194 </body>
195 </html>