Debian Codegraph @

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