1
<!--$Id: env_set_lk_conflicts.so,v 10.26 2001/05/15 14:44:10 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB: DbEnv::set_lk_conflicts</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a>
12
<table width="100%"><tr valign=top>
14
<h1>DbEnv::set_lk_conflicts</h1>
17
<a href="../api_cxx/cxx_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
22
#include <db_cxx.h>
25
DbEnv::set_lk_conflicts(u_int8_t *conflicts, int nmodes);
28
<p>Set the locking conflicts matrix.
29
The <b>conflicts</b> argument
30
is an <b>nmodes</b> by <b>nmodes</b> array.
31
A non-0 value for the array element indicates that requested_mode and
33
<p><blockquote><pre>conflicts[requested_mode][held_mode]</pre></blockquote>
34
<p>The <i>not-granted</i> mode must be represented by 0.
35
<p>If DbEnv::set_lk_conflicts is never called, a standard conflicts
36
array is used; see <a href="../ref/lock/stdmode.html">Standard Lock
37
Modes</a> for more information.
38
<p>The DbEnv::set_lk_conflicts interface may be used only to configure Berkeley DB before
39
the <a href="../api_cxx/env_open.html">DbEnv::open</a> interface is called.
40
<p>The DbEnv::set_lk_conflicts method either returns a non-zero error value or throws an exception that
41
encapsulates a non-zero error value on failure, and returns 0 on success.
43
<p>The DbEnv::set_lk_conflicts method may fail and throw an exception or return a non-zero error for the following conditions:
45
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
46
<p>Called after <a href="../api_cxx/env_open.html">DbEnv::open</a> was called.
49
<p><dt>ENOMEM<dd>No memory was available to copy the conflicts array.
51
<p>The DbEnv::set_lk_conflicts method may fail and throw an exception or return a non-zero error for errors specified for other Berkeley DB and C library or system methods.
52
If a catastrophic error has occurred, the DbEnv::set_lk_conflicts method may fail and either
53
return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> or throw an exception encapsulating
54
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
57
<a href="../api_cxx/dbenv_class.html">DbEnv</a>, <a href="../api_cxx/lock_class.html">DbLock</a>
59
<a href="../api_cxx/env_set_lk_conflicts.html">DbEnv::set_lk_conflicts</a>,
60
<a href="../api_cxx/env_set_lk_detect.html">DbEnv::set_lk_detect</a>,
61
<a href="../api_cxx/env_set_lk_max.html">DbEnv::set_lk_max</a>,
62
<a href="../api_cxx/env_set_lk_max_lockers.html">DbEnv::set_lk_max_lockers</a>,
63
<a href="../api_cxx/env_set_lk_max_locks.html">DbEnv::set_lk_max_locks</a>,
64
<a href="../api_cxx/env_set_lk_max_objects.html">DbEnv::set_lk_max_objects</a>,
65
<a href="../api_cxx/lock_detect.html">DbEnv::lock_detect</a>,
66
<a href="../api_cxx/lock_get.html">DbEnv::lock_get</a>,
67
<a href="../api_cxx/lock_id.html">DbEnv::lock_id</a>,
68
<a href="../api_cxx/lock_put.html">DbLock::put</a>,
69
<a href="../api_cxx/lock_stat.html">DbEnv::lock_stat</a>,
71
<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a>.
73
<table width="100%"><tr><td><br></td><td align=right>
74
<a href="../api_cxx/cxx_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
76
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>