1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
<!--$Id: lockng_class.html,v 1.1.1.1 2003/11/20 22:14:29 toshok Exp $-->
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
<!--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,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td>
<h1>DbLockNotGrantedException</h1>
</td>
<td align=right>
<a href="../api_cxx/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<hr size=1 noshade>
<tt>
<h3><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></h3>
<h1>Description</h1>
<p>This manual page describes the DbLockNotGrantedException class and
how it is used by the various Db* classes.
<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> option was specified), or by any <a href="../api_cxx/db_class.html">Db</a>
operation performed in the context of a transaction begun using the
<a href="../api_cxx/txn_begin.html#DB_TXN_NOWAIT">DB_TXN_NOWAIT</a> option, is unable to be granted immediately.
<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>The <b>get_mode</b> method returns the <b>mode</b> argument 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>The <b>get_obj</b> method returns the <b>obj</b> argument when
<a href="../api_cxx/lock_get.html">DbEnv::lock_get</a> was called, and returns the <b>obj</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>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>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.
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_cxx/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>
|