1<!--$Id: memp_openfd.so,v 10.4 2007/11/08 16:28:12 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: DbEnv::set_mp_max_openfd</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>DbEnv::set_mp_max_openfd</b> 14</td> 15<td align=right> 16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db_cxx.h> 23<p> 24int 25DbEnv::set_mp_max_openfd(int maxopenfd); 26<p> 27int 28DbEnv::get_mp_max_openfd(int *maxopenfdp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: DbEnv::set_mp_max_openfd</b> 32<p>The DbEnv::set_mp_max_openfd method limits the number of file descriptors 33the library will open concurrently when flushing dirty pages from the 34cache.</p> 35<p>The database environment's limit on open file descriptors to flush dirty pages may also be configured using the 36environment's <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file. The syntax of the entry in that 37file is a single line with the string "set_max_openfd", one or more whitespace 38characters, and the number of open file descriptors. 39Because the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is read when the database environment 40is opened, it will silently overrule configuration done before that 41time.</p> 42<p>The <a href="../api_cxx/memp_maxwrite.html">DbEnv::set_mp_max_write</a> method configures a database environment, not only operations 43performed using the specified <a href="../api_cxx/env_class.html">DbEnv</a> handle.</p> 44<p>The DbEnv::set_mp_max_openfd method 45either returns a non-zero error value 46or throws an exception that encapsulates a non-zero error value on 47failure, and returns 0 on success. 48</p> 49<b>Parameters</b> <br> 50 <b>maxopenfd</b><ul compact><li>The maximum number of file descriptors that may be concurrently opened 51by the library when flushing dirty pages from the cache.</ul> 52<br> 53<br><b>Errors</b> 54<p>The DbEnv::set_mp_max_openfd method 55may fail and throw 56<a href="../api_cxx/except_class.html">DbException</a>, 57encapsulating one of the following non-zero errors, or return one of 58the following non-zero errors:</p> 59<br> 60<b>EINVAL</b><ul compact><li>An 61invalid flag value or parameter was specified.</ul> 62<br> 63<hr size=1 noshade> 64<b>Description: DbEnv::get_mp_max_openfd</b> 65<p>The DbEnv::get_mp_max_openfd method returns the maximum number of file descriptors open.</p> 66<p>The DbEnv::get_mp_max_openfd method may be called at any time during the life of the 67application.</p> 68<p>The DbEnv::get_mp_max_openfd method 69either returns a non-zero error value 70or throws an exception that encapsulates a non-zero error value on 71failure, and returns 0 on success. 72</p> 73<b>Parameters</b> <br> 74 <b>maxopenfdp</b><ul compact><li>The DbEnv::get_mp_max_openfd method returns the 75maximum number of file descriptors open in <b>maxopenfdp</b>.</ul> 76<br> 77<hr size=1 noshade> 78<br><b>Class</b> 79<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/mempfile_class.html">DbMpoolFile</a> 80<br><b>See Also</b> 81<a href="../api_cxx/memp_list.html">Memory Pools and Related Methods</a> 82</tt> 83<table width="100%"><tr><td><br></td><td align=right> 84<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 85</td></tr></table> 86<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 87</body> 88</html> 89