Debian Codegraph @

docs/api_reference/CXX/envset_lk_max_locks.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_lk_max_locks()</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="lock.html" title="Chapter 7.  The DbLock Handle" />
11 <link rel="prev" href="envset_lk_max_lockers.html" title="DbEnv::set_lk_max_lockers()" />
12 <link rel="next" href="envset_lk_max_objects.html" title="DbEnv::set_lk_max_objects()" />
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_lk_max_locks()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_lk_max_lockers.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 7. 
26 The DbLock Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_lk_max_objects.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="envset_lk_max_locks"></a>DbEnv::set_lk_max_locks()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::set_lk_max_locks(u_int32_t max); </pre>
45 <p>
46 This method is deprecated. Instead, use
47 <a class="xref" href="envset_memory_init.html" title="DbEnv::set_memory_init()">DbEnv::set_memory_init()</a>,
48 <a class="xref" href="envset_memory_max.html" title="DbEnv::set_memory_max()">DbEnv::set_memory_max()</a>, and
49 <a class="xref" href="envset_lk_tablesize.html" title="DbEnv::set_lk_tablesize()">DbEnv::set_lk_tablesize()</a>.
50 </p>
51 <p>
52 Set the maximum number of locks supported by the Berkeley DB
53 environment. This value is used by
54 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> to estimate how
55 much space to allocate for various lock-table data structures.
56 The default value is 1000 locks.
57 The final value specified for the locks should be more than or equal to
58 the number of lock table partitions.
59 For specific information on configuring
60 the size of the lock subsystem, see
61 <a href="../../programmer_reference/lock_max.html" class="olink">Configuring locking: sizing the system</a>.
62 </p>
63 <p>
64 The database environment's maximum number of locks may also be
65 configured using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. The syntax of
66 the entry in that file is a single line with the string
67 "set_lk_max_locks", one or more whitespace characters, and the
68 number of locks. 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
69 database environment is opened, it will silently overrule
70 configuration done before that time.
71 </p>
72 <p>
73 The <code class="methodname">DbEnv::set_lk_max_locks()</code> method configures a database
74 environment, not only operations performed using the specified
75 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> handle.
76 </p>
77 <p>
78 The <code class="methodname">DbEnv::set_lk_max_locks()</code> method may not be called after the
79 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> method is
80 called. If the database environment already exists when
81 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> is called, the
82 information specified to <code class="methodname">DbEnv::set_lk_max_locks()</code> will be ignored.
83 </p>
84 <p>
85 The <code class="methodname">DbEnv::set_lk_max_locks()</code> <span>
86
87 <span>
88 method either returns a non-zero error value or throws an
89 exception that encapsulates a non-zero error value on
90 failure, and returns 0 on success.
91 </span>
92 </span>
93 </p>
94 <div class="sect2" lang="en" xml:lang="en">
95 <div class="titlepage">
96 <div>
97 <div>
98 <h3 class="title"><a id="idp7959568"></a>Parameters</h3>
99 </div>
100 </div>
101 </div>
102 <div class="sect3" lang="en" xml:lang="en">
103 <div class="titlepage">
104 <div>
105 <div>
106 <h4 class="title"><a id="idp7959736"></a>max</h4>
107 </div>
108 </div>
109 </div>
110 <p>
111 The <span class="bold"><strong>max</strong></span> parameter is the maximum
112 number of locks supported by the Berkeley DB environment.
113 </p>
114 </div>
115 </div>
116 <div class="sect2" lang="en" xml:lang="en">
117 <div class="titlepage">
118 <div>
119 <div>
120 <h3 class="title"><a id="idp7948576"></a>Errors</h3>
121 </div>
122 </div>
123 </div>
124 <p>
125 The <code class="methodname">DbEnv::set_lk_max_locks()</code> <span>
126
127 <span>
128 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
129 exception, encapsulating one of the following non-zero errors, or return one
130 of the following non-zero errors:
131 </span>
132 </span>
133 </p>
134 <div class="sect3" lang="en" xml:lang="en">
135 <div class="titlepage">
136 <div>
137 <div>
138 <h4 class="title"><a id="idp7971032"></a>EINVAL</h4>
139 </div>
140 </div>
141 </div>
142 <p>
143 If the method was called after <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a>
144 was called; or if an invalid flag value or parameter was specified.
145 </p>
146 </div>
147 </div>
148 <div class="sect2" lang="en" xml:lang="en">
149 <div class="titlepage">
150 <div>
151 <div>
152 <h3 class="title"><a id="idp7972360"></a>Class</h3>
153 </div>
154 </div>
155 </div>
156 <p>
157 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>,
158 <a class="link" href="lock.html" title="Chapter 7.  The DbLock Handle">DbLock</a>
159 </p>
160 </div>
161 <div class="sect2" lang="en" xml:lang="en">
162 <div class="titlepage">
163 <div>
164 <div>
165 <h3 class="title"><a id="idp7960648"></a>See Also</h3>
166 </div>
167 </div>
168 </div>
169 <p>
170 <a class="xref" href="lock.html#locklist" title="Locking Subsystem and Related Methods">Locking Subsystem and Related Methods</a>
171 </p>
172 </div>
173 </div>
174 <div class="navfooter">
175 <hr />
176 <table width="100%" summary="Navigation footer">
177 <tr>
178 <td width="40%" align="left"><a accesskey="p" href="envset_lk_max_lockers.html">Prev</a> </td>
179 <td width="20%" align="center">
180 <a accesskey="u" href="lock.html">Up</a>
181 </td>
182 <td width="40%" align="right"> <a accesskey="n" href="envset_lk_max_objects.html">Next</a></td>
183 </tr>
184 <tr>
185 <td width="40%" align="left" valign="top">DbEnv::set_lk_max_lockers() </td>
186 <td width="20%" align="center">
187 <a accesskey="h" href="index.html">Home</a>
188 </td>
189 <td width="40%" align="right" valign="top"> DbEnv::set_lk_max_objects()</td>
190 </tr>
191 </table>
192 </div>
193 </body>
194 </html>