Debian Codegraph @

docs/api_reference/CXX/dblocknotgranted.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>DbLockNotGrantedException</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="dbexception.html" title="Chapter 6. The DbException Class" />
11 <link rel="prev" href="dbdeadlock.html" title="DbDeadlockException" />
12 <link rel="next" href="dbmemory.html" title="DbMemoryException" />
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">DbLockNotGrantedException</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbdeadlock.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 6. The DbException Class</th>
26 <td width="20%" align="right"> <a accesskey="n" href="dbmemory.html">Next</a></td>
27 </tr>
28 </table>
29 <hr />
30 </div>
31 <div class="sect1" lang="en" xml:lang="en">
32 <div class="titlepage">
33 <div>
34 <div>
35 <h2 class="title" style="clear: both"><a id="dblocknotgranted"></a>DbLockNotGrantedException</h2>
36 </div>
37 </div>
38 </div>
39 <pre class="programlisting">#include &lt;db_cxx.h&gt;
40
41 class DbLockNotGrantedException : public DbException {
42 public:
43 db_lockop_t get_op() const;
44 db_lockmode_t get_mode() const;
45 const Dbt* get_obj() const;
46 DbLock *get_lock() const;
47 int get_index() const;
48 }; </pre>
49 <p>
50 This information describes the <code class="classname">DbLockNotGrantedException</code> class and how
51 it is used by the various Berkeley DB classes.
52 </p>
53 <p>
54 A <code class="classname">DbLockNotGrantedException</code> is thrown when
55 lock or transaction timeouts have been configured, a database operation has timed out, and the
56 <a class="link" href="envset_flags.html#envset_flags_DB_TIME_NOTGRANTED">DB_TIME_NOTGRANTED</a>
57 configuration flag has been specified.
58 </p>
59 <p>
60 Additionally <code class="classname">DbLockNotGrantedException</code> is thrown when a Berkeley DB
61 Concurrent Data Store database environment configured for lock timeouts was unable to grant
62 a lock in the allowed time.
63 </p>
64 <p>
65 Finally, <code class="classname">DbLockNotGrantedException</code> is thrown when a lock requested using the
66 <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a>
67 or
68 <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a>
69 methods, where the <a class="link" href="lockvec.html#vec_DB_LOCK_NOWAIT">DB_LOCK_NOWAIT</a>
70 flag or lock timers were configured, could not be granted before the wait-time expired.
71 </p>
72 <p>
73 The <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> errno value is set to
74 <code class="literal">DB_LOCK_NOTGRANTED</code>.
75 </p>
76 <p>
77 The following getter methods are available on this class:
78 </p>
79 <div class="itemizedlist">
80 <ul type="disc">
81 <li>
82 <p>
83 <code class="methodname">get_op()</code>
84 </p>
85 <p>
86 Returns <code class="literal">DB_LOCK_GET</code> when <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a>
87 was called, and returns the <span class="bold"><strong>op</strong></span> for the failed
88 <code class="literal">DB_LOCKREQ</code> when <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a>
89 was called. If this exception is raised due to a database
90 operation, <code class="literal">DB_LOCK_GET</code> is returned.
91 </p>
92 </li>
93 <li>
94 <p>
95 <code class="methodname">get_mode()</code>
96 </p>
97 <p>
98 Returns the <span class="bold"><strong>mode</strong></span> parameter when
99 <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a> was called, and returns the
100 <span class="bold"><strong>mode</strong></span> for the failed <code class="literal">DB_LOCKREQ</code>
101 when <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a> was called.
102 If this exception is raised due to a database operation,
103 <code class="literal">DB_LOCK_NG</code> is returned.
104 </p>
105 </li>
106 <li>
107 <p>
108 <code class="methodname">get_obj()</code>
109 </p>
110 <p>
111 Returns the <span class="bold"><strong>object</strong></span> parameter when
112 <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a> was called, and returns the
113 <span class="bold"><strong>object</strong></span> for the failed <code class="literal">DB_LOCKREQ</code>
114 when <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a> was called.
115 The <a class="link" href="dbt.html" title="Chapter 4.  The Dbt Handle">Dbt</a> pointer may or may not refer valid
116 memory, depending on whether the <a class="link" href="dbt.html" title="Chapter 4.  The Dbt Handle">Dbt</a>
117 used in the call to the failed <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a>
118 or <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a> method is still in
119 scope and has not been deleted.
120 </p>
121 </li>
122 <li>
123 <p>
124 <code class="methodname">get_lock()</code>
125 </p>
126 <p>
127 Returns NULL when <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a> was called,
128 and returns the <span class="bold"><strong>lock</strong></span> in the failed <code class="literal">DB_LOCKREQ</code>
129 when <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a> was called.
130 If this exception is raised due to a database operation, NULL is returned.
131 </p>
132 </li>
133 <li>
134 <p>
135 <code class="methodname">get_index()</code>
136 </p>
137 <p>
138 Returns <code class="literal">-1</code> when <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a> was called,
139 and returns the index of the failed <code class="literal">DB_LOCKREQ</code>
140 when <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a> was called.
141 If this exception is raised due to a database operation,
142 <code class="literal">0</code> is returned.
143 </p>
144 </li>
145 </ul>
146 </div>
147 </div>
148 <div class="navfooter">
149 <hr />
150 <table width="100%" summary="Navigation footer">
151 <tr>
152 <td width="40%" align="left"><a accesskey="p" href="dbdeadlock.html">Prev</a> </td>
153 <td width="20%" align="center">
154 <a accesskey="u" href="dbexception.html">Up</a>
155 </td>
156 <td width="40%" align="right"> <a accesskey="n" href="dbmemory.html">Next</a></td>
157 </tr>
158 <tr>
159 <td width="40%" align="left" valign="top">DbDeadlockException </td>
160 <td width="20%" align="center">
161 <a accesskey="h" href="index.html">Home</a>
162 </td>
163 <td width="40%" align="right" valign="top"> DbMemoryException</td>
164 </tr>
165 </table>
166 </div>
167 </body>
168 </html>