1<!--$Id: lock.so,v 1.6 2001/09/27 02:25:51 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB Reference Guide: Release 4.0: lock_XXX</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td> 13<td align=right><a href="/upgrade.4.0/deadlock.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/upgrade.4.0/log.html"><img src="/images/next.gif" alt="Next"></a> 14</td></tr></table> 15<p align=center><b>Release 4.0: lock_XXX</b></p> 16<p>The C API for the Berkeley DB Locking subsystem was reworked in the 4.0 17release as follows:</p> 18<table border=1 align=center> 19<tr><th>Historic functional interface</th><th>Berkeley DB 4.X method</th></tr> 20<tr><td>lock_detect</td><td><a href="/api_c/lock_detect.html">DB_ENV->lock_detect</a></td></tr> 21<tr><td>lock_get</td><td><a href="/api_c/lock_get.html">DB_ENV->lock_get</a></td></tr> 22<tr><td>lock_id</td><td><a href="/api_c/lock_id.html">DB_ENV->lock_id</a></td></tr> 23<tr><td>lock_put</td><td><a href="/api_c/lock_put.html">DB_ENV->lock_put</a></td></tr> 24<tr><td>lock_stat</td><td><a href="/api_c/lock_stat.html">DB_ENV->lock_stat</a></td></tr> 25<tr><td>lock_vec</td><td><a href="/api_c/lock_vec.html">DB_ENV->lock_vec</a></td></tr> 26</table> 27<p>Applications calling any of these functions should update their calls 28to use the enclosing <a href="/api_c/env_class.html">DB_ENV</a> handle's method (easily done as the 29first argument to the existing call is the correct handle to use).</p> 30<p>In addition, the <a href="/api_c/lock_stat.html">DB_ENV->lock_stat</a> call has been changed in the 4.0 31release to take a flags argument. To leave their historic behavior 32unchanged, applications should add a final argument of 0 to any calls 33made to <a href="/api_c/lock_stat.html">DB_ENV->lock_stat</a>.</p> 34<p>The C++ and Java APIs for the DbLock::put (DbLock.put) method was 35reworked in the 4.0 release to make the lock put interface a method of 36the <a href="/api_c/env_class.html">DB_ENV</a> handle rather than the DbLock handle. Applications 37calling the DbLock::put or DbLock.put method should update their calls 38to use the enclosing <a href="/api_c/env_class.html">DB_ENV</a> handle's method (easily done as the 39first argument to the existing call is the correct handle to use).</p> 40<table width="100%"><tr><td><br></td><td align=right><a href="/upgrade.4.0/deadlock.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/upgrade.4.0/log.html"><img src="/images/next.gif" alt="Next"></a> 41</td></tr></table> 42<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 43</body> 44</html> 45