Debian Codegraph @

docs/api_reference/C/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>DB_MPOOLFILE-&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="memp.html" title="Chapter 8.  The DB_MPOOLFILE Handle" />
11 <link rel="prev" href="mempset_pgcookie.html" title="DB_MPOOLFILE-&gt;set_pgcookie()" />
12 <link rel="next" href="mutex.html" title="Chapter 9.  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">DB_MPOOLFILE-&gt;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 8. 
26 The DB_MPOOLFILE 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>DB_MPOOLFILE-&gt;set_priority()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_MPOOLFILE-&gt;set_priority(DB_MPOOLFILE *mpf, 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 8.  The DB_MPOOLFILE Handle">DB_MPOOLFILE</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">DB_MPOOLFILE-&gt;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">DB_MPOOLFILE-&gt;set_priority()</code> method using the
60 <a class="link" href="memp.html" title="Chapter 8.  The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> handle
61 returned by the <a class="xref" href="dbget_mpf.html" title="DB-&gt;get_mpf()">DB-&gt;get_mpf()</a> method.
62 </p>
63 <p>
64 The <code class="methodname">DB_MPOOLFILE-&gt;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 8.  The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> handle.
67 </p>
68 <p>
69 The <code class="methodname">DB_MPOOLFILE-&gt;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">DB_MPOOLFILE-&gt;set_priority()</code> <span>
74 <span>
75 method returns a non-zero error value on failure and 0 on success.
76 </span>
77
78 </span>
79 </p>
80 <div class="sect2" lang="en" xml:lang="en">
81 <div class="titlepage">
82 <div>
83 <div>
84 <h3 class="title"><a id="idp53650224"></a>Parameters</h3>
85 </div>
86 </div>
87 </div>
88 <div class="sect3" lang="en" xml:lang="en">
89 <div class="titlepage">
90 <div>
91 <div>
92 <h4 class="title"><a id="idp53649576"></a>priority</h4>
93 </div>
94 </div>
95 </div>
96 <p>
97 The <span class="bold"><strong>priority</strong></span> parameter must be set to
98 one of the following values:
99 </p>
100 <div class="itemizedlist">
101 <ul type="disc">
102 <li>
103 <p>
104 <code class="literal">DB_PRIORITY_VERY_LOW</code>
105 </p>
106 <p>
107 The lowest priority: pages are the most likely to be discarded.
108 </p>
109 </li>
110 <li>
111 <p>
112 <code class="literal">DB_PRIORITY_LOW</code>
113 </p>
114 <p>
115 The next lowest priority.
116 </p>
117 </li>
118 <li>
119 <p>
120 <code class="literal">DB_PRIORITY_DEFAULT</code>
121 </p>
122 <p>
123 The default priority.
124 </p>
125 </li>
126 <li>
127 <p>
128 <code class="literal">DB_PRIORITY_HIGH</code>
129 </p>
130 <p>
131 The next highest priority.
132 </p>
133 </li>
134 <li>
135 <p>
136 <code class="literal">DB_PRIORITY_VERY_HIGH</code>
137 </p>
138 <p>
139 The highest priority: pages are the least likely to be discarded.
140 </p>
141 </li>
142 </ul>
143 </div>
144 </div>
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="idp53665288"></a>Class</h3>
151 </div>
152 </div>
153 </div>
154 <p>
155 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>, <a class="link" href="memp.html" title="Chapter 8.  The DB_MPOOLFILE Handle">DB_MPOOLFILE</a>
156 </p>
157 </div>
158 <div class="sect2" lang="en" xml:lang="en">
159 <div class="titlepage">
160 <div>
161 <div>
162 <h3 class="title"><a id="idp53651088"></a>See Also</h3>
163 </div>
164 </div>
165 </div>
166 <p>
167 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a>
168 </p>
169 </div>
170 </div>
171 <div class="navfooter">
172 <hr />
173 <table width="100%" summary="Navigation footer">
174 <tr>
175 <td width="40%" align="left"><a accesskey="p" href="mempset_pgcookie.html">Prev</a> </td>
176 <td width="20%" align="center">
177 <a accesskey="u" href="memp.html">Up</a>
178 </td>
179 <td width="40%" align="right"> <a accesskey="n" href="mutex.html">Next</a></td>
180 </tr>
181 <tr>
182 <td width="40%" align="left" valign="top">DB_MPOOLFILE-&gt;set_pgcookie() </td>
183 <td width="20%" align="center">
184 <a accesskey="h" href="index.html">Home</a>
185 </td>
186 <td width="40%" align="right" valign="top"> Chapter 9. 
187 Mutex Methods
188 </td>
189 </tr>
190 </table>
191 </div>
192 </body>
193 </html>