Debian Codegraph @

docs/api_reference/CXX/envset_lk_conflicts.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_conflicts()</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_tablesize.html" title="DbEnv::get_lk_tablesize()" />
12 <link rel="next" href="envset_lk_detect.html" title="DbEnv::set_lk_detect()" />
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_conflicts()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envget_lk_tablesize.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_detect.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_conflicts"></a>DbEnv::set_lk_conflicts()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::set_lk_conflicts(u_int8_t *conflicts, int nmodes); </pre>
45 <p>
46 Set the locking conflicts matrix.
47 </p>
48 <p>
49 If <code class="methodname">DbEnv::set_lk_conflicts()</code> is never called, a standard conflicts
50 array is used; see <a href="../../programmer_reference/lock_stdmode.html" class="olink">Standard Lock Modes</a> for more information.
51 </p>
52 <p>
53 The <code class="methodname">DbEnv::set_lk_conflicts()</code> method configures a database
54 environment, not only operations performed using the specified
55 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> handle.
56 </p>
57 <p>
58 The <code class="methodname">DbEnv::set_lk_conflicts()</code> method may not be called after the
59 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> method is
60 called. If the database environment already exists when
61 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> is called, the
62 information specified to <code class="methodname">DbEnv::set_lk_conflicts()</code> will be ignored.
63 </p>
64 <p>
65 The <code class="methodname">DbEnv::set_lk_conflicts()</code> <span>
66
67 <span>
68 method either returns a non-zero error value or throws an
69 exception that encapsulates a non-zero error value on
70 failure, and returns 0 on success.
71 </span>
72 </span>
73 </p>
74 <div class="sect2" lang="en" xml:lang="en">
75 <div class="titlepage">
76 <div>
77 <div>
78 <h3 class="title"><a id="idp7902336"></a>Parameters</h3>
79 </div>
80 </div>
81 </div>
82 <div class="sect3" lang="en" xml:lang="en">
83 <div class="titlepage">
84 <div>
85 <div>
86 <h4 class="title"><a id="idp7901688"></a>conflicts</h4>
87 </div>
88 </div>
89 </div>
90 <p>
91 The <span class="bold"><strong>conflicts</strong></span> parameter is the new
92 locking conflicts matrix. The <span class="bold"><strong>conflicts</strong></span>
93 parameter is an <span class="bold"><strong>nmodes</strong></span> by
94 <span class="bold"><strong>nmodes</strong></span> array. A non-0 value for the array
95 element indicates that requested_mode and held_mode conflict:
96 </p>
97 <pre class="programlisting"> conflicts[requested_mode][held_mode] </pre>
98 <p>
99 The <span class="emphasis"><em>not-granted</em></span> mode must be represented by 0.
100 </p>
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="idp7864672"></a>nmodes</h4>
107 </div>
108 </div>
109 </div>
110 <p>
111 The <span class="bold"><strong>nmodes</strong></span> parameter is the size of
112 the lock conflicts matrix.
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="idp7887872"></a>Errors</h3>
121 </div>
122 </div>
123 </div>
124 <p>
125 The <code class="methodname">DbEnv::set_lk_conflicts()</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="idp7913896"></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 class="sect3" lang="en" xml:lang="en">
148 <div class="titlepage">
149 <div>
150 <div>
151 <h4 class="title"><a id="idp7913488"></a>ENOMEM</h4>
152 </div>
153 </div>
154 </div>
155 <p>
156 The conflicts array could not be copied.
157 </p>
158 </div>
159 </div>
160 <div class="sect2" lang="en" xml:lang="en">
161 <div class="titlepage">
162 <div>
163 <div>
164 <h3 class="title"><a id="idp7909576"></a>Class</h3>
165 </div>
166 </div>
167 </div>
168 <p>
169 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>,
170 <a class="link" href="lock.html" title="Chapter 7.  The DbLock Handle">DbLock</a>
171 </p>
172 </div>
173 <div class="sect2" lang="en" xml:lang="en">
174 <div class="titlepage">
175 <div>
176 <div>
177 <h3 class="title"><a id="idp7903200"></a>See Also</h3>
178 </div>
179 </div>
180 </div>
181 <p>
182 <a class="xref" href="lock.html#locklist" title="Locking Subsystem and Related Methods">Locking Subsystem and Related Methods</a>
183 </p>
184 </div>
185 </div>
186 <div class="navfooter">
187 <hr />
188 <table width="100%" summary="Navigation footer">
189 <tr>
190 <td width="40%" align="left"><a accesskey="p" href="envget_lk_tablesize.html">Prev</a> </td>
191 <td width="20%" align="center">
192 <a accesskey="u" href="lock.html">Up</a>
193 </td>
194 <td width="40%" align="right"> <a accesskey="n" href="envset_lk_detect.html">Next</a></td>
195 </tr>
196 <tr>
197 <td width="40%" align="left" valign="top">DbEnv::get_lk_tablesize() </td>
198 <td width="20%" align="center">
199 <a accesskey="h" href="index.html">Home</a>
200 </td>
201 <td width="40%" align="right" valign="top"> DbEnv::set_lk_detect()</td>
202 </tr>
203 </table>
204 </div>
205 </body>
206 </html>