Debian Codegraph @

docs/api_reference/CXX/mempset_mp_max_write.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>DbEnv::set_mp_max_write()</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_mp_max_openfd.html" title="DbEnv::set_mp_max_openfd()" />
12 <link rel="next" href="envset_mp_mmapsize.html" title="DbEnv::set_mp_mmapsize()" />
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">DbEnv::set_mp_max_write()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="mempset_mp_max_openfd.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="envset_mp_mmapsize.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_mp_max_write"></a>DbEnv::set_mp_max_write()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::set_mp_max_write(int maxwrite, db_timeout_t maxwrite_sleep); </pre>
45 <p>
46 The <code class="methodname">DbEnv::set_mp_max_write()</code> method limits the number of sequential
47 write operations scheduled by the library when flushing dirty pages
48 from the cache.
49 </p>
50 <p>
51 The database environment's maximum number of sequential write
52 operations may also be configured using the environment's
53 <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. The syntax of the entry in that file is a single
54 line with the string "set_mp_max_write", one or more whitespace
55 characters, and the maximum number of sequential writes and the
56 number of microseconds to sleep, also separated by whitespace
57 characters. Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is read when the database
58 environment is opened, it will silently overrule configuration
59 done before that time.
60 </p>
61 <p>
62 The <code class="methodname">DbEnv::set_mp_max_write()</code> method configures a database
63 environment, not only operations performed using the specified
64 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> handle.
65 </p>
66 <p>
67 The <code class="methodname">DbEnv::set_mp_max_write()</code> <span>
68
69 <span>
70 method either returns a non-zero error value or throws an
71 exception that encapsulates a non-zero error value on
72 failure, and returns 0 on success.
73 </span>
74 </span>
75 </p>
76 <div class="sect2" lang="en" xml:lang="en">
77 <div class="titlepage">
78 <div>
79 <div>
80 <h3 class="title"><a id="idp8828480"></a>Parameters</h3>
81 </div>
82 </div>
83 </div>
84 <div class="sect3" lang="en" xml:lang="en">
85 <div class="titlepage">
86 <div>
87 <div>
88 <h4 class="title"><a id="idp8827832"></a>maxwrite</h4>
89 </div>
90 </div>
91 </div>
92 <p>
93 The maximum number of sequential write operations scheduled by the
94 library when flushing dirty pages from the cache, or 0 if there is no
95 limitation on the number of sequential write operations.
96 </p>
97 </div>
98 <div class="sect3" lang="en" xml:lang="en">
99 <div class="titlepage">
100 <div>
101 <div>
102 <h4 class="title"><a id="idp8834968"></a>maxwrite_sleep</h4>
103 </div>
104 </div>
105 </div>
106 <p>
107 The number of microseconds the thread of control should pause before
108 scheduling further write operations. It must be specified as an
109 unsigned 32-bit number of microseconds, limiting the maximum pause to
110 roughly 71 minutes.
111 </p>
112 </div>
113 </div>
114 <div class="sect2" lang="en" xml:lang="en">
115 <div class="titlepage">
116 <div>
117 <div>
118 <h3 class="title"><a id="idp8829560"></a>Errors</h3>
119 </div>
120 </div>
121 </div>
122 <p>
123 The <code class="methodname">DbEnv::set_mp_max_write()</code> <span>
124
125 <span>
126 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
127 exception, encapsulating one of the following non-zero errors, or return one
128 of the following non-zero errors:
129 </span>
130 </span>
131 </p>
132 <div class="sect3" lang="en" xml:lang="en">
133 <div class="titlepage">
134 <div>
135 <div>
136 <h4 class="title"><a id="idp8832968"></a>EINVAL</h4>
137 </div>
138 </div>
139 </div>
140 <p>
141 An invalid flag value or parameter was specified.
142 </p>
143 </div>
144 </div>
145 <div class="sect2" lang="en" xml:lang="en">
146 <div class="titlepage">
147 <div>
148 <div>
149 <h3 class="title"><a id="idp8797648"></a>Class</h3>
150 </div>
151 </div>
152 </div>
153 <p>
154 <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>
155 </p>
156 </div>
157 <div class="sect2" lang="en" xml:lang="en">
158 <div class="titlepage">
159 <div>
160 <div>
161 <h3 class="title"><a id="idp8827616"></a>See Also</h3>
162 </div>
163 </div>
164 </div>
165 <p>
166 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a>
167 </p>
168 </div>
169 </div>
170 <div class="navfooter">
171 <hr />
172 <table width="100%" summary="Navigation footer">
173 <tr>
174 <td width="40%" align="left"><a accesskey="p" href="mempset_mp_max_openfd.html">Prev</a> </td>
175 <td width="20%" align="center">
176 <a accesskey="u" href="memp.html">Up</a>
177 </td>
178 <td width="40%" align="right"> <a accesskey="n" href="envset_mp_mmapsize.html">Next</a></td>
179 </tr>
180 <tr>
181 <td width="40%" align="left" valign="top">DbEnv::set_mp_max_openfd() </td>
182 <td width="20%" align="center">
183 <a accesskey="h" href="index.html">Home</a>
184 </td>
185 <td width="40%" align="right" valign="top"> DbEnv::set_mp_mmapsize()</td>
186 </tr>
187 </table>
188 </div>
189 </body>
190 </html>