| 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>Chapter 7. The DbLock Handle</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="index.html" title="Berkeley DB C++ API Reference" /> |
| 11 | <link rel="prev" href="dbrunrecovery.html" title="DbRunRecoveryException" /> |
| 12 | <link rel="next" href="envget_lk_conflicts.html" title="DbEnv::get_lk_conflicts()" /> |
| 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">Chapter 7. |
| 22 | The DbLock Handle |
| 23 | </th> |
| 24 | </tr> |
| 25 | <tr> |
| 26 | <td width="20%" align="left"><a accesskey="p" href="dbrunrecovery.html">Prev</a> </td> |
| 27 | <th width="60%" align="center"> </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="envget_lk_conflicts.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="chapter" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title"><a id="lock"></a>Chapter 7. |
| 38 | The DbLock Handle |
| 39 | </h2> |
| 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | <pre class="programlisting"> |
| 44 | #include <db_cxx.h> |
| 45 | |
| 46 | class DbLock { |
| 47 | public: |
| 48 | DbLock(); |
| 49 | DbLock(const DbLock &); |
| 50 | DbLock &operator = (const DbLock &); |
| 51 | ~DbLock(); |
| 52 | }; </pre> |
| 53 | <p> |
| 54 | The locking interfaces for the Berkeley DB database environment |
| 55 | are methods of the <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a> |
| 56 | handle. The <code class="classname">DbLock</code> object is |
| 57 | the handle for a single lock, and has no methods of its own. |
| 58 | </p> |
| 59 | <div class="sect1" lang="en" xml:lang="en"> |
| 60 | <div class="titlepage"> |
| 61 | <div> |
| 62 | <div> |
| 63 | <h2 class="title" style="clear: both"><a id="locklist"></a>Locking Subsystem and Related Methods</h2> |
| 64 | </div> |
| 65 | </div> |
| 66 | </div> |
| 67 | <div class="navtable"> |
| 68 | <table border="1" width="80%"> |
| 69 | <thead> |
| 70 | <tr> |
| 71 | <th>Locking Subsystem and Related Methods</th> |
| 72 | <th>Description</th> |
| 73 | </tr> |
| 74 | </thead> |
| 75 | <tbody> |
| 76 | <tr> |
| 77 | <td> |
| 78 | <a class="xref" href="dbdeadlock.html" title="DbDeadlockException">DbDeadlockException</a> |
| 79 | </td> |
| 80 | <td>Exception class for deadlocks</td> |
| 81 | </tr> |
| 82 | <tr> |
| 83 | <td> |
| 84 | <a class="xref" href="dblocknotgranted.html" title="DbLockNotGrantedException">DbLockNotGrantedException</a> |
| 85 | </td> |
| 86 | <td>Exception class for lock request failures</td> |
| 87 | </tr> |
| 88 | <tr> |
| 89 | <td> |
| 90 | <a class="xref" href="lockdetect.html" title="DbEnv::lock_detect()">DbEnv::lock_detect()</a> |
| 91 | </td> |
| 92 | <td>Perform deadlock detection</td> |
| 93 | </tr> |
| 94 | <tr> |
| 95 | <td> |
| 96 | <a class="xref" href="lockget.html" title="DbEnv::lock_get()">DbEnv::lock_get()</a> |
| 97 | </td> |
| 98 | <td>Acquire a lock</td> |
| 99 | </tr> |
| 100 | <tr> |
| 101 | <td> |
| 102 | <a class="xref" href="lockid.html" title="DbEnv::lock_id()">DbEnv::lock_id()</a> |
| 103 | </td> |
| 104 | <td>Acquire a locker ID</td> |
| 105 | </tr> |
| 106 | <tr> |
| 107 | <td> |
| 108 | <a class="xref" href="lockid_free.html" title="DbEnv::lock_id_free()">DbEnv::lock_id_free()</a> |
| 109 | </td> |
| 110 | <td>Release a locker ID</td> |
| 111 | </tr> |
| 112 | <tr> |
| 113 | <td> |
| 114 | <a class="xref" href="lockput.html" title="DbEnv::lock_put()">DbEnv::lock_put()</a> |
| 115 | </td> |
| 116 | <td>Release a lock</td> |
| 117 | </tr> |
| 118 | <tr> |
| 119 | <td> |
| 120 | <a class="xref" href="lockstat.html" title="DbEnv::lock_stat()">DbEnv::lock_stat()</a> |
| 121 | </td> |
| 122 | <td>Return lock subsystem statistics</td> |
| 123 | </tr> |
| 124 | <tr> |
| 125 | <td> |
| 126 | <a class="xref" href="lockstat_print.html" title="DbEnv::lock_stat_print()">DbEnv::lock_stat_print()</a> |
| 127 | </td> |
| 128 | <td>Print lock subsystem statistics</td> |
| 129 | </tr> |
| 130 | <tr> |
| 131 | <td> |
| 132 | <a class="xref" href="lockvec.html" title="DbEnv::lock_vec()">DbEnv::lock_vec()</a> |
| 133 | </td> |
| 134 | <td>Acquire/release locks</td> |
| 135 | </tr> |
| 136 | <tr> |
| 137 | <td> |
| 138 | <a class="xref" href="envcdsgroup_begin.html" title="DbEnv::cdsgroup_begin()">DbEnv::cdsgroup_begin()</a> |
| 139 | </td> |
| 140 | <td>Get a locker ID in Berkeley DB Concurrent Data Store</td> |
| 141 | </tr> |
| 142 | <tr> |
| 143 | <td colspan="2"> |
| 144 | <span class="bold"> |
| 145 | <strong>Locking Subsystem Configuration</strong> |
| 146 | </span> |
| 147 | </td> |
| 148 | </tr> |
| 149 | <tr> |
| 150 | <td><a class="xref" href="envset_timeout.html" title="DbEnv::set_timeout()">DbEnv::set_timeout()</a>, <a class="xref" href="envget_timeout.html" title="DbEnv::get_timeout()">DbEnv::get_timeout()</a></td> |
| 151 | <td>Set/get lock and transaction timeout</td> |
| 152 | </tr> |
| 153 | <tr> |
| 154 | <td><a class="xref" href="envset_lk_conflicts.html" title="DbEnv::set_lk_conflicts()">DbEnv::set_lk_conflicts()</a>, <a class="xref" href="envget_lk_conflicts.html" title="DbEnv::get_lk_conflicts()">DbEnv::get_lk_conflicts()</a></td> |
| 155 | <td>Set/get lock conflicts matrix</td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td><a class="xref" href="envset_lk_detect.html" title="DbEnv::set_lk_detect()">DbEnv::set_lk_detect()</a>, <a class="xref" href="envget_lk_detect.html" title="DbEnv::get_lk_detect()">DbEnv::get_lk_detect()</a></td> |
| 159 | <td>Set/get automatic deadlock detection</td> |
| 160 | </tr> |
| 161 | <tr> |
| 162 | <td><a class="xref" href="envset_lk_max_lockers.html" title="DbEnv::set_lk_max_lockers()">DbEnv::set_lk_max_lockers()</a>, <a class="xref" href="envget_lk_max_lockers.html" title="DbEnv::get_lk_max_lockers()">DbEnv::get_lk_max_lockers()</a></td> |
| 163 | <td>Set/get maximum number of lockers</td> |
| 164 | </tr> |
| 165 | <tr> |
| 166 | <td><a class="xref" href="envset_lk_max_locks.html" title="DbEnv::set_lk_max_locks()">DbEnv::set_lk_max_locks()</a>, <a class="xref" href="envget_lk_max_locks.html" title="DbEnv::get_lk_max_locks()">DbEnv::get_lk_max_locks()</a></td> |
| 167 | <td>Set/get maximum number of locks</td> |
| 168 | </tr> |
| 169 | <tr> |
| 170 | <td><a class="xref" href="envset_lk_max_objects.html" title="DbEnv::set_lk_max_objects()">DbEnv::set_lk_max_objects()</a>, <a class="xref" href="envget_lk_max_objects.html" title="DbEnv::get_lk_max_objects()">DbEnv::get_lk_max_objects()</a></td> |
| 171 | <td>Set/get maximum number of lock objects</td> |
| 172 | </tr> |
| 173 | <tr> |
| 174 | <td><a class="xref" href="envset_lk_partitions.html" title="DbEnv::set_lk_partitions()">DbEnv::set_lk_partitions()</a>, <a class="xref" href="envget_lk_partitions.html" title="DbEnv::get_lk_partitions()">DbEnv::get_lk_partitions()</a></td> |
| 175 | <td>Set/get number of lock partitions</td> |
| 176 | </tr> |
| 177 | <tr> |
| 178 | <td><a class="xref" href="envset_lk_priority.html" title="DbEnv::set_lk_priority()">DbEnv::set_lk_priority()</a>, <a class="xref" href="envget_lk_priority.html" title="DbEnv::get_lk_priority()">DbEnv::get_lk_priority()</a></td> |
| 179 | <td>Set/get a locker's deadlock priority</td> |
| 180 | </tr> |
| 181 | <tr> |
| 182 | <td><a class="xref" href="envset_lk_tablesize.html" title="DbEnv::set_lk_tablesize()">DbEnv::set_lk_tablesize()</a>, <a class="xref" href="envget_lk_tablesize.html" title="DbEnv::get_lk_tablesize()">DbEnv::get_lk_tablesize()</a></td> |
| 183 | <td>Set/get size of the lock object hash table</td> |
| 184 | </tr> |
| 185 | </tbody> |
| 186 | </table> |
| 187 | </div> |
| 188 | </div> |
| 189 | </div> |
| 190 | <div class="navfooter"> |
| 191 | <hr /> |
| 192 | <table width="100%" summary="Navigation footer"> |
| 193 | <tr> |
| 194 | <td width="40%" align="left"><a accesskey="p" href="dbrunrecovery.html">Prev</a> </td> |
| 195 | <td width="20%" align="center"> </td> |
| 196 | <td width="40%" align="right"> <a accesskey="n" href="envget_lk_conflicts.html">Next</a></td> |
| 197 | </tr> |
| 198 | <tr> |
| 199 | <td width="40%" align="left" valign="top">DbRunRecoveryException </td> |
| 200 | <td width="20%" align="center"> |
| 201 | <a accesskey="h" href="index.html">Home</a> |
| 202 | </td> |
| 203 | <td width="40%" align="right" valign="top"> DbEnv::get_lk_conflicts()</td> |
| 204 | </tr> |
| 205 | </table> |
| 206 | </div> |
| 207 | </body> |
| 208 | </html> |