1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
<!--$Id: memp_set_priority.so,v 10.23 2005/08/12 17:05:52 bostic Exp $-->
<!--Copyright 1997-2005 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_MPOOLFILE->set_priority</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<h3>DB_MPOOLFILE->set_priority</h3>
</td>
<td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<h3><pre>
#include <db.h>
<p>
int
DB_MPOOLFILE->set_priority(DB_MPOOLFILE *mpf, DB_CACHE_PRIORITY priority);
<p>
int
DB_MPOOLFILE->get_priority(DB_MPOOLFILE *mpf, DB_CACHE_PRIORITY *priorityp);
</pre></h3>
<hr size=1 noshade>
<h3>Description: DB_MPOOLFILE->set_priority</h3>
<p>Set the cache priority for pages from the specified file. The priority
of a page biases the replacement algorithm to be more or less likely to
discard a page when space is needed in the buffer pool. The bias is
temporary, and pages will eventually be discarded if they are not
referenced again. The DB_MPOOLFILE->set_priority method is only advisory, and
does not guarantee pages will be treated in a specific way.</p>
<p>To set the priority for the pages belonging to a particular database,
call the DB_MPOOLFILE->set_priority method using the <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a>
handle stored in the <b>mpf</b> field of the <a href="../api_c/db_class.html">DB</a> handle.</p>
<p>The DB_MPOOLFILE->set_priority method configures a file in the memory pool, not only
operations performed using the specified <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle.</p>
<p>The DB_MPOOLFILE->set_priority method may be called at any time during the life of the
application.</p>
<p>The DB_MPOOLFILE->set_priority method
returns a non-zero error value on failure
and 0 on success.
</p>
<h3>Parameters</h3>
<dl compact>
<dt><b>priority</b><dd>The <b>priority</b> parameter must be set to one of the following
values:
<dl compact>
<dt><a name="DB_PRIORITY_VERY_LOW">DB_PRIORITY_VERY_LOW</a><dd>The lowest priority: pages are the most likely to be discarded.
<dt><a name="DB_PRIORITY_LOW">DB_PRIORITY_LOW</a><dd>The next lowest priority.
<dt><a name="DB_PRIORITY_DEFAULT">DB_PRIORITY_DEFAULT</a><dd>The default priority.
<dt><a name="DB_PRIORITY_HIGH">DB_PRIORITY_HIGH</a><dd>The next highest priority.
<dt><a name="DB_PRIORITY_VERY_HIGH">DB_PRIORITY_VERY_HIGH</a><dd>The highest priority: pages are the least likely to be discarded.
</dl>
</dl>
<hr size=1 noshade>
<h3>Description: DB_MPOOLFILE->get_priority</h3>
<p>The DB_MPOOLFILE->get_priority method returns the cache priority.</p>
<p>The DB_MPOOLFILE->get_priority method may be called at any time during the life of the
application.</p>
<p>The DB_MPOOLFILE->get_priority method
returns a non-zero error value on failure
and 0 on success.
</p>
<h3>Parameters</h3>
<dl compact>
<dt><b>priorityp</b><dd>The DB_MPOOLFILE->get_priority method returns the
cache priority in <b>priorityp</b>.
</dl>
<hr size=1 noshade>
<h3>Class</h3>
<a href="../api_c/db_class.html">DB</a>
<h3>See Also</h3>
<a href="../api_c/db_list.html">Databases and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1><a href="../sleepycat/legal.html">Copyright (c) 1996-2005</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>
</body>
</html>
|