Debian Codegraph @

docs/api_reference/CXX/memp.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>Chapter 9.  The DbMpoolFile Handle</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="index.html" title="Berkeley DB C++ API Reference" />
11 <link rel="prev" href="logcompare.html" title="DbEnv::log_compare()" />
12 <link rel="next" href="dbget_mpf.html" title="Db::get_mpf()" />
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">Chapter 9. 
22 The DbMpoolFile Handle
23 </th>
24 </tr>
25 <tr>
26 <td width="20%" align="left"><a accesskey="p" href="logcompare.html">Prev</a> </td>
27 <th width="60%" align="center"> </th>
28 <td width="20%" align="right"> <a accesskey="n" href="dbget_mpf.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="chapter" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title"><a id="memp"></a>Chapter 9. 
38 The DbMpoolFile Handle
39 </h2>
40 </div>
41 </div>
42 </div>
43 <pre class="programlisting">#include &lt;db_cxx.h&gt;
44
45 class DbMpoolFile {
46 public:
47 DB_MPOOLFILE *DbMpoolFile::get_DB_MPOOLFILE();
48 const DB_MPOOLFILE *DbMpoolFile::get_const_DB_MPOOLFILE() const;
49 ...
50 }; </pre>
51 <p>
52 The memory pool interfaces for the Berkeley DB database environment are methods of the
53 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> handle. The
54 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> memory pool methods and the
55 <code class="classname">DB_MPOOLFILE</code> class provide general-purpose, page-oriented buffer
56 management of files. Although designed to work with the other
57 <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>classes, they are also useful for more general
58 purposes. The memory pools are referred to in this document as simply
59 <span class="emphasis"><em>the cache</em></span>.
60 </p>
61 <p>
62 The cache may be shared between processes. The cache is usually filled by pages from one or
63 more files. Pages in the cache are replaced in LRU (least-recently-used) order, with each
64 new page replacing the page that has been unused the longest. Pages retrieved from the
65 cache using <a class="xref" href="mempfget.html" title="DbMpoolFile::get()">DbMpoolFile::get()</a> are
66 <span class="emphasis"><em>pinned</em></span> in the cache until they are returned to the control of the
67 cache using the <a class="xref" href="mempput.html" title="DbMpoolFile::put()">DbMpoolFile::put()</a> method.
68 </p>
69 <p>
70 The <code class="classname">DbMpoolFile</code> object is the handle for a file in the
71 cache. The handle is not free-threaded. Once the
72 <a class="xref" href="mempfclose.html" title="DbMpoolFile::close()">DbMpoolFile::close()</a> method is called, the handle
73 may not be accessed again, regardless of that method's return.
74 </p>
75 <div class="sect1" lang="en" xml:lang="en">
76 <div class="titlepage">
77 <div>
78 <div>
79 <h2 class="title" style="clear: both"><a id="memplist"></a>Memory Pools and Related Methods</h2>
80 </div>
81 </div>
82 </div>
83 <div class="navtable">
84 <table border="1" width="80%">
85 <thead>
86 <tr>
87 <th>Memory Pools and Related Methods</th>
88 <th>Description</th>
89 </tr>
90 </thead>
91 <tbody>
92 <tr>
93 <td>
94 <a class="xref" href="dbmemory.html" title="DbMemoryException">DbMemoryException</a>
95 </td>
96 <td>Exception class for insufficient memory</td>
97 </tr>
98 <tr>
99 <td>
100 <a class="xref" href="dbget_mpf.html" title="Db::get_mpf()">Db::get_mpf()</a>
101 </td>
102 <td>Return the DbMpoolFile for a Db</td>
103 </tr>
104 <tr>
105 <td>
106 <a class="xref" href="mempstat.html" title="DbEnv::memp_stat()">DbEnv::memp_stat()</a>
107 </td>
108 <td>Return cache statistics</td>
109 </tr>
110 <tr>
111 <td>
112 <a class="xref" href="mempstat_print.html" title="DbEnv::memp_stat_print()">DbEnv::memp_stat_print()</a>
113 </td>
114 <td>Print cache statistics</td>
115 </tr>
116 <tr>
117 <td>
118 <a class="xref" href="mempsync.html" title="DbEnv::memp_sync()">DbEnv::memp_sync()</a>
119 </td>
120 <td>Flush all pages from the cache</td>
121 </tr>
122 <tr>
123 <td>
124 <a class="xref" href="memptrickle.html" title="DbEnv::memp_trickle()">DbEnv::memp_trickle()</a>
125 </td>
126 <td>Flush some pages from the cache</td>
127 </tr>
128 <tr>
129 <td colspan="2">
130 <span class="bold">
131 <strong>Memory Pool Configuration</strong>
132 </span>
133 </td>
134 </tr>
135 <tr>
136 <td>
137 <a class="xref" href="mempregister.html" title="DbEnv::memp_register()">DbEnv::memp_register()</a>
138 </td>
139 <td>Register a custom file type</td>
140 </tr>
141 <tr>
142 <td><a class="xref" href="envset_cache_max.html" title="DbEnv::set_cache_max()">DbEnv::set_cache_max()</a>, <a class="xref" href="envget_cache_max.html" title="DbEnv::get_cache_max()">DbEnv::get_cache_max()</a></td>
143 <td>Set/get the maximum cache size</td>
144 </tr>
145 <tr>
146 <td><a class="xref" href="envset_cachesize.html" title="DbEnv::set_cachesize()">DbEnv::set_cachesize()</a>, <a class="xref" href="envget_cachesize.html" title="DbEnv::get_cachesize()">DbEnv::get_cachesize()</a></td>
147 <td>Set/get the environment cache size</td>
148 </tr>
149 <tr>
150 <td><a class="xref" href="mempset_mp_max_openfd.html" title="DbEnv::set_mp_max_openfd()">DbEnv::set_mp_max_openfd()</a>, <a class="xref" href="mempget_mp_max_openfd.html" title="DbEnv::get_mp_max_openfd()">DbEnv::get_mp_max_openfd()</a></td>
151 <td>Set/get the maximum number of open file descriptors</td>
152 </tr>
153 <tr>
154 <td><a class="xref" href="mempset_mp_max_write.html" title="DbEnv::set_mp_max_write()">DbEnv::set_mp_max_write()</a>, <a class="xref" href="mempget_mp_max_write.html" title="DbEnv::get_mp_max_write()">DbEnv::get_mp_max_write()</a></td>
155 <td>Set/get the maximum number of sequential disk writes</td>
156 </tr>
157 <tr>
158 <td><a class="xref" href="envset_mp_mmapsize.html" title="DbEnv::set_mp_mmapsize()">DbEnv::set_mp_mmapsize()</a>, <a class="xref" href="envget_mp_mmapsize.html" title="DbEnv::get_mp_mmapsize()">DbEnv::get_mp_mmapsize()</a></td>
159 <td>Set/get maximum file size to memory map when opened read-only</td>
160 </tr>
161 <tr>
162 <td><a class="xref" href="envset_mp_mtxcount.html" title="DbEnv::set_mp_mtxcount()">DbEnv::set_mp_mtxcount()</a>, <a class="xref" href="envget_mp_mtxcount.html" title="DbEnv::get_mp_mtxcount()">DbEnv::get_mp_mtxcount()</a></td>
163 <td>Set/get the number of mutexes allocated to the hash table</td>
164 </tr>
165 <tr>
166 <td><a class="xref" href="envset_mp_pagesize.html" title="DbEnv::set_mp_pagesize()">DbEnv::set_mp_pagesize()</a>, <a class="xref" href="envget_mp_pagesize.html" title="DbEnv::get_mp_pagesize()">DbEnv::get_mp_pagesize()</a></td>
167 <td>Set/get page size to configure the buffer pool</td>
168 </tr>
169 <tr>
170 <td><a class="xref" href="envset_mp_tablesize.html" title="DbEnv::set_mp_tablesize()">DbEnv::set_mp_tablesize()</a>, <a class="xref" href="envget_mp_tablesize.html" title="DbEnv::get_mp_tablesize()">DbEnv::get_mp_tablesize()</a></td>
171 <td>Set/get the hash table size</td>
172 </tr>
173 <tr>
174 <td colspan="2">
175 <span class="bold">
176 <strong>Memory Pool Files</strong>
177 </span>
178 </td>
179 </tr>
180 <tr>
181 <td>
182 <a class="xref" href="mempfcreate.html" title="DbEnv::memp_fcreate()">DbEnv::memp_fcreate()</a>
183 </td>
184 <td>Create a memory pool file handle</td>
185 </tr>
186 <tr>
187 <td>
188 <a class="xref" href="mempfclose.html" title="DbMpoolFile::close()">DbMpoolFile::close()</a>
189 </td>
190 <td>Close a file in the cache</td>
191 </tr>
192 <tr>
193 <td>
194 <a class="xref" href="mempfget.html" title="DbMpoolFile::get()">DbMpoolFile::get()</a>
195 </td>
196 <td>Get page from a file in the cache</td>
197 </tr>
198 <tr>
199 <td>
200 <a class="xref" href="mempfopen.html" title="DbMpoolFile::open()">DbMpoolFile::open()</a>
201 </td>
202 <td>Open a file in the cache</td>
203 </tr>
204 <tr>
205 <td>
206 <a class="xref" href="mempput.html" title="DbMpoolFile::put()">DbMpoolFile::put()</a>
207 </td>
208 <td>Return a page to the cache</td>
209 </tr>
210 <tr>
211 <td>
212 <a class="xref" href="mempfsync.html" title="DbMpoolFile::sync()">DbMpoolFile::sync()</a>
213 </td>
214 <td>Flush pages from a file from the cache</td>
215 </tr>
216 <tr>
217 <td colspan="2">
218 <span class="bold">
219 <strong>Memory Pool File Configuration</strong>
220 </span>
221 </td>
222 </tr>
223 <tr>
224 <td><a class="xref" href="mempset_clear_len.html" title="DbMpoolFile::set_clear_len()">DbMpoolFile::set_clear_len()</a>, <a class="xref" href="mempget_clear_len.html" title="DbMpoolFile::get_clear_len()">DbMpoolFile::get_clear_len()</a></td>
225 <td>Set/get number of bytes to clear when creating a new page</td>
226 </tr>
227 <tr>
228 <td><a class="xref" href="mempset_fileid.html" title="DbMpoolFile::set_fileid()">DbMpoolFile::set_fileid()</a>, <a class="xref" href="mempget_fileid.html" title="DbMpoolFile::get_fileid()">DbMpoolFile::get_fileid()</a></td>
229 <td>Set/get file unique identifier</td>
230 </tr>
231 <tr>
232 <td><a class="xref" href="mempset_flags.html" title="DbMpoolFile::set_flags()">DbMpoolFile::set_flags()</a>, <a class="xref" href="mempget_flags.html" title="DbMpoolFile::get_flags()">DbMpoolFile::get_flags()</a></td>
233 <td>Set/get file options</td>
234 </tr>
235 <tr>
236 <td><a class="xref" href="mempset_ftype.html" title="DbMpoolFile::set_ftype()">DbMpoolFile::set_ftype()</a>, <a class="xref" href="mempget_ftype.html" title="DbMpoolFile::get_ftype()">DbMpoolFile::get_ftype()</a></td>
237 <td>Set/get file type</td>
238 </tr>
239 <tr>
240 <td><a class="xref" href="mempset_lsn_offset.html" title="DbMpoolFile::set_lsn_offset()">DbMpoolFile::set_lsn_offset()</a>, <a class="xref" href="mempget_lsn_offset.html" title="DbMpoolFile::get_lsn_offset()">DbMpoolFile::get_lsn_offset()</a></td>
241 <td>Set/get file log-sequence-number offset</td>
242 </tr>
243 <tr>
244 <td><a class="xref" href="mempset_maxsize.html" title="DbMpoolFile::set_maxsize()">DbMpoolFile::set_maxsize()</a>, <a class="xref" href="mempget_maxsize.html" title="DbMpoolFile::get_maxsize()">DbMpoolFile::get_maxsize()</a></td>
245 <td>Set/get maximum file size</td>
246 </tr>
247 <tr>
248 <td><a class="xref" href="mempset_pgcookie.html" title="DbMpoolFile::set_pgcookie()">DbMpoolFile::set_pgcookie()</a>, <a class="xref" href="mempget_pgcookie.html" title="DbMpoolFile::get_pgcookie()">DbMpoolFile::get_pgcookie()</a></td>
249 <td>Set/get file cookie for pgin/pgout</td>
250 </tr>
251 <tr>
252 <td><a class="xref" href="mempset_priority.html" title="DbMpoolFile::set_priority()">DbMpoolFile::set_priority()</a>, <a class="xref" href="mempget_priority.html" title="DbMpoolFile::get_priority()">DbMpoolFile::get_priority()</a></td>
253 <td>Set/get cache file priority</td>
254 </tr>
255 </tbody>
256 </table>
257 </div>
258 </div>
259 </div>
260 <div class="navfooter">
261 <hr />
262 <table width="100%" summary="Navigation footer">
263 <tr>
264 <td width="40%" align="left"><a accesskey="p" href="logcompare.html">Prev</a> </td>
265 <td width="20%" align="center"> </td>
266 <td width="40%" align="right"> <a accesskey="n" href="dbget_mpf.html">Next</a></td>
267 </tr>
268 <tr>
269 <td width="40%" align="left" valign="top">DbEnv::log_compare() </td>
270 <td width="20%" align="center">
271 <a accesskey="h" href="index.html">Home</a>
272 </td>
273 <td width="40%" align="right" valign="top"> Db::get_mpf()</td>
274 </tr>
275 </table>
276 </div>
277 </body>
278 </html>