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">
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbEnv::get_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="envget_lk_max_lockers.html" title="DbEnv::get_lk_max_lockers()" />
12 <link rel="next" href="envget_lk_max_objects.html" title="DbEnv::get_lk_max_objects()" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">DbEnv::get_lk_max_locks()</th>
24 <td width="20%" align="left"><a accesskey="p" href="envget_lk_max_lockers.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 7.
28 <td width="20%" align="right"> <a accesskey="n" href="envget_lk_max_objects.html">Next</a></td>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
37 <h2 class="title" style="clear: both"><a id="envget_lk_max_locks"></a>DbEnv::get_lk_max_locks()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
44 DbEnv::get_lk_max_locks(u_int32_t *lk_maxp);</pre>
46 The <code class="methodname">DbEnv::get_lk_max_locks()</code> method returns the maximum number of
47 potential locks. You can configure this using the
48 <a class="xref" href="envset_lk_max_locks.html" title="DbEnv::set_lk_max_locks()">DbEnv::set_lk_max_locks()</a>
52 The <code class="methodname">DbEnv::get_lk_max_locks()</code> method may be called at any time
53 during the life of the application.
56 The <code class="methodname">DbEnv::get_lk_max_locks()</code> <span>
59 method either returns a non-zero error value or throws an
60 exception that encapsulates a non-zero error value on
61 failure, and returns 0 on success.
65 <div class="sect2" lang="en" xml:lang="en">
66 <div class="titlepage">
69 <h3 class="title"><a id="idp2493512"></a>Parameters</h3>
73 <div class="sect3" lang="en" xml:lang="en">
74 <div class="titlepage">
77 <h4 class="title"><a id="idp2492864"></a>lk_maxp</h4>
82 The <code class="methodname">DbEnv::get_lk_max_locks()</code> method returns the maximum number of
83 locks in <span class="bold"><strong>lk_maxp</strong></span>.
87 <div class="sect2" lang="en" xml:lang="en">
88 <div class="titlepage">
91 <h3 class="title"><a id="idp2442288"></a>Errors</h3>
96 The <code class="methodname">DbEnv::get_lk_max_locks()</code> <span>
99 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
100 exception, encapsulating one of the following non-zero errors, or return one
101 of the following non-zero errors:
105 <div class="sect3" lang="en" xml:lang="en">
106 <div class="titlepage">
109 <h4 class="title"><a id="idp2500112"></a>EINVAL</h4>
114 The method was called on an environment which had been
115 opened without being configured for locking.
119 <div class="sect2" lang="en" xml:lang="en">
120 <div class="titlepage">
123 <h3 class="title"><a id="idp2499032"></a>Class</h3>
128 <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>, <a class="link" href="lock.html" title="Chapter 7. The DbLock Handle">DbLock</a>
131 <div class="sect2" lang="en" xml:lang="en">
132 <div class="titlepage">
135 <h3 class="title"><a id="idp2483824"></a>See Also</h3>
140 <a class="xref" href="lock.html#locklist" title="Locking Subsystem and Related Methods">Locking Subsystem and Related Methods</a>,
141 <a class="xref" href="envset_lk_max_locks.html" title="DbEnv::set_lk_max_locks()">DbEnv::set_lk_max_locks()</a>
145 <div class="navfooter">
147 <table width="100%" summary="Navigation footer">
149 <td width="40%" align="left"><a accesskey="p" href="envget_lk_max_lockers.html">Prev</a> </td>
150 <td width="20%" align="center">
151 <a accesskey="u" href="lock.html">Up</a>
153 <td width="40%" align="right"> <a accesskey="n" href="envget_lk_max_objects.html">Next</a></td>
156 <td width="40%" align="left" valign="top">DbEnv::get_lk_max_lockers() </td>
157 <td width="20%" align="center">
158 <a accesskey="h" href="index.html">Home</a>
160 <td width="40%" align="right" valign="top"> DbEnv::get_lk_max_objects()</td>