Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / api_reference / C / dbcset_priority.html
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>DBcursor-&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="dbc.html" title="Chapter 3.  The DBcursor Handle" />
11     <link rel="prev" href="dbcput.html" title="DBcursor-&gt;put()" />
12     <link rel="next" href="dbt.html" title="Chapter 4.  The DBT Handle" />
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">DBcursor-&gt;set_priority()</th>
22         </tr>
23         <tr>
24           <td width="20%" align="left"><a accesskey="p" href="dbcput.html">Prev</a> </td>
25           <th width="60%" align="center">Chapter 3. 
26                 The DBcursor Handle
27         </th>
28           <td width="20%" align="right"> <a accesskey="n" href="dbt.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="dbcset_priority"></a>DBcursor-&gt;set_priority()</h2>
38           </div>
39         </div>
40       </div>
41       <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DBcursor-&gt;set_priority(DBC *DbCursor, DB_CACHE_PRIORITY priority);  </pre>
45       <p>
46             Set the cache priority for pages referenced by the 
47             <a class="link" href="dbc.html" title="Chapter 3.  The DBcursor Handle">DBcursor</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 buffer pool.
52          The bias is temporary, and pages will eventually be discarded if they
53          are not referenced again.  The <code class="methodname">DBcursor-&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          The <code class="methodname">DBcursor-&gt;set_priority()</code> method may be called at any time during
59          the life of the application.
60     </p>
61       <p>
62          The <code class="methodname">DBcursor-&gt;set_priority()</code> <span>
63             <span>
64                   method returns a non-zero error value on failure and 0 on success.
65             </span>
66             
67         </span>
68     </p>
69       <div class="sect2" lang="en" xml:lang="en">
70         <div class="titlepage">
71           <div>
72             <div>
73               <h3 class="title"><a id="idp59003712"></a>Parameters</h3>
74             </div>
75           </div>
76         </div>
77         <div class="sect3" lang="en" xml:lang="en">
78           <div class="titlepage">
79             <div>
80               <div>
81                 <h4 class="title"><a id="idp59022600"></a>priority</h4>
82               </div>
83             </div>
84           </div>
85           <p>
86                           The <span class="bold"><strong>priority</strong></span> parameter must be set to
87                           one of the following values:
88                      </p>
89           <div class="itemizedlist">
90             <ul type="disc">
91               <li>
92                 <p><a id="dbcset_priority_DB_PRIORITY_VERY_LOW"></a>
93                   <code class="literal">DB_PRIORITY_VERY_LOW</code>
94             </p>
95                 <p>
96                  The lowest priority: pages are the most likely to be discarded.
97             </p>
98               </li>
99               <li>
100                 <p><a id="dbcset_priority_DB_PRIORITY_LOW"></a>
101                   <code class="literal">DB_PRIORITY_LOW</code>
102             </p>
103                 <p>
104                 The next lowest priority.
105             </p>
106               </li>
107               <li>
108                 <p><a id="dbcset_priority_DB_PRIORITY_DEFAULT"></a>
109                   <code class="literal">DB_PRIORITY_DEFAULT</code>
110             </p>
111                 <p>
112                 The default priority.
113             </p>
114               </li>
115               <li>
116                 <p><a id="dbcset_priority_DB_PRIORITY_HIGH"></a>
117                   <code class="literal">DB_PRIORITY_HIGH</code>
118             </p>
119                 <p>
120                 The next highest priority.
121             </p>
122               </li>
123               <li>
124                 <p><a id="dbcset_priority_DB_PRIORITY_VERY_HIGH"></a>
125                   <code class="literal">DB_PRIORITY_VERY_HIGH</code>
126             </p>
127                 <p>
128                  The highest priority: pages are the least likely to be discarded.
129             </p>
130               </li>
131             </ul>
132           </div>
133         </div>
134       </div>
135       <div class="sect2" lang="en" xml:lang="en">
136         <div class="titlepage">
137           <div>
138             <div>
139               <h3 class="title"><a id="idp59033464"></a>Class</h3>
140             </div>
141           </div>
142         </div>
143         <p>
144                 <a class="link" href="dbc.html" title="Chapter 3.  The DBcursor Handle">DBcursor</a>  
145             </p>
146       </div>
147       <div class="sect2" lang="en" xml:lang="en">
148         <div class="titlepage">
149           <div>
150             <div>
151               <h3 class="title"><a id="idp59034544"></a>See Also</h3>
152             </div>
153           </div>
154         </div>
155         <p>
156                      <a class="xref" href="dbc.html#dbclist" title="Database Cursors and Related Methods">Database Cursors and Related Methods</a> 
157                 </p>
158       </div>
159     </div>
160     <div class="navfooter">
161       <hr />
162       <table width="100%" summary="Navigation footer">
163         <tr>
164           <td width="40%" align="left"><a accesskey="p" href="dbcput.html">Prev</a> </td>
165           <td width="20%" align="center">
166             <a accesskey="u" href="dbc.html">Up</a>
167           </td>
168           <td width="40%" align="right"> <a accesskey="n" href="dbt.html">Next</a></td>
169         </tr>
170         <tr>
171           <td width="40%" align="left" valign="top">DBcursor-&gt;put() </td>
172           <td width="20%" align="center">
173             <a accesskey="h" href="index.html">Home</a>
174           </td>
175           <td width="40%" align="right" valign="top"> Chapter 4. 
176                 The DBT Handle
177         </td>
178         </tr>
179       </table>
180     </div>
181   </body>
182 </html>