1<!--$Id: lockng_class.so,v 1.14 2004/08/13 03:38:57 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: DbLockNotGrantedException</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> 13<b>DbLockNotGrantedException</b> 14</td> 15<td align=right> 16<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db_cxx.h> 23<p> 24class DbLockNotGrantedException : public DbException { 25public: 26 db_lockop_t get_op() const; 27 db_lockmode_t get_mode() const; 28 const Dbt* get_obj() const; 29 DbLock *get_lock() const; 30 int get_index() const; 31}; 32</pre></b> 33<hr size=1 noshade> 34<b>Description: DbLockNotGrantedException</b> 35<p>This information describes the DbLockNotGrantedException class and 36how it is used by the various Db* classes.</p> 37<p>A DbLockNotGrantedException is thrown when a lock requested using 38the <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> or <a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> methods, where the <a href="../api_cxx/lock_vec.html#DB_LOCK_NOWAIT">DB_LOCK_NOWAIT</a> 39flag or lock timers were configured, could not be granted before the 40wait-time expired.</p> 41<p>Additionally, DbLockNotGrantedException is thrown when a Berkeley DB 42Concurrent Data Store database environment configured for lock timeouts 43was unable to grant a lock in the allowed time.</p> 44<p>Additionally, DbLockNotGrantedException is thrown when lock or 45transaction timeouts have been configured, a database operation has 46timed out, and the <a href="../api_cxx/env_set_flags.html#DB_TIME_NOTGRANTED">DB_TIME_NOTGRANTED</a> configuration flag has 47been specified.</p> 48<p>The <a href="../api_cxx/except_class.html">DbException</a> errno value is set to DB_LOCKNOTGRANTED.</p> 49<p>The <b>get_op</b> method returns 0 when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called, 50and returns the <b>op</b> for the failed DB_LOCKREQ when 51<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p> 52<p>The <b>get_mode</b> method returns the <b>mode</b> parameter when 53<a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called, and returns the <b>mode</b> for the failed 54DB_LOCKREQ when <a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p> 55<p>The <b>get_obj</b> method returns the <b>mode</b> parameter when 56returns the <b>object</b> parameter when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called, 57and returns the <b>object</b> for the failed DB_LOCKREQ when 58<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called. 59The <a href="../api_cxx/dbt_class.html">Dbt</a> pointer may or may not refer to valid memory, depending on 60whether the <a href="../api_cxx/dbt_class.html">Dbt</a> used in the call to the failed <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> or 61<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> method is still in scope and has not been deleted.</p> 62<p>The <b>get_lock</b> method returns NULL when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was 63called, and returns the <b>lock</b> in the failed DB_LOCKREQ 64when <a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p> 65<p>The <b>get_index</b> method returns -1 when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was 66called, and returns the index of the failed DB_LOCKREQ when 67<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p> 68</tt> 69<table width="100%"><tr><td><br></td><td align=right> 70<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 71</td></tr></table> 72<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 73</body> 74</html> 75