75 lines
4.1 KiB
HTML
75 lines
4.1 KiB
HTML
<!--$Id: lockng_class.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
|
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
|
<!--See the file LICENSE for redistribution information.-->
|
|
<html>
|
|
<head>
|
|
<title>Berkeley DB: DbLockNotGrantedException</title>
|
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
|
</head>
|
|
<body bgcolor=white>
|
|
<table width="100%"><tr valign=top>
|
|
<td>
|
|
<b>DbLockNotGrantedException</b>
|
|
</td>
|
|
<td align=right>
|
|
<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></td>
|
|
</tr></table>
|
|
<hr size=1 noshade>
|
|
<tt>
|
|
<b><pre>
|
|
#include <db_cxx.h>
|
|
<p>
|
|
class DbLockNotGrantedException : public DbException {
|
|
public:
|
|
db_lockop_t get_op() const;
|
|
db_lockmode_t get_mode() const;
|
|
const Dbt* get_obj() const;
|
|
DbLock *get_lock() const;
|
|
int get_index() const;
|
|
};
|
|
</pre></b>
|
|
<hr size=1 noshade>
|
|
<b>Description: DbLockNotGrantedException</b>
|
|
<p>This information describes the DbLockNotGrantedException class and
|
|
how it is used by the various Db* classes.</p>
|
|
<p>A DbLockNotGrantedException is thrown when a lock requested using
|
|
the <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>
|
|
flag or lock timers were configured, could not be granted before the
|
|
wait-time expired.</p>
|
|
<p>Additionally, DbLockNotGrantedException is thrown when a Berkeley DB
|
|
Concurrent Data Store database environment configured for lock timeouts
|
|
was unable to grant a lock in the allowed time.</p>
|
|
<p>Additionally, DbLockNotGrantedException is thrown when lock or
|
|
transaction timeouts have been configured, a database operation has
|
|
timed out, and the <a href="../api_cxx/env_set_flags.html#DB_TIME_NOTGRANTED">DB_TIME_NOTGRANTED</a> configuration flag has
|
|
been specified.</p>
|
|
<p>The <a href="../api_cxx/except_class.html">DbException</a> errno value is set to DB_LOCKNOTGRANTED.</p>
|
|
<p>The <b>get_op</b> method returns 0 when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called,
|
|
and returns the <b>op</b> for the failed DB_LOCKREQ when
|
|
<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p>
|
|
<p>The <b>get_mode</b> method returns the <b>mode</b> parameter when
|
|
<a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called, and returns the <b>mode</b> for the failed
|
|
DB_LOCKREQ when <a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p>
|
|
<p>The <b>get_obj</b> method returns the <b>mode</b> parameter when
|
|
returns the <b>object</b> parameter when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called,
|
|
and returns the <b>object</b> for the failed DB_LOCKREQ when
|
|
<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.
|
|
The <a href="../api_cxx/dbt_class.html">Dbt</a> pointer may or may not refer to valid memory, depending on
|
|
whether 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
|
|
<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> method is still in scope and has not been deleted.</p>
|
|
<p>The <b>get_lock</b> method returns NULL when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was
|
|
called, and returns the <b>lock</b> in the failed DB_LOCKREQ
|
|
when <a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p>
|
|
<p>The <b>get_index</b> method returns -1 when <a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was
|
|
called, and returns the index of the failed DB_LOCKREQ when
|
|
<a href="../api_cxx/lock_vec.html">DbEnv::lock_vec</a> was called.</p>
|
|
</tt>
|
|
<table width="100%"><tr><td><br></td><td align=right>
|
|
<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>
|
|
</td></tr></table>
|
|
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
|
</body>
|
|
</html>
|