2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB: DbLockNotGrantedException</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
15
<h1>DbLockNotGrantedException</h1>
18
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
23
import com.sleepycat.db.*;
25
public class DbLockNotGrantedException extends DbException {
27
public int get_mode();
29
public DbLock get_lock();
30
public int get_index();
34
<p>This manual page describes the DbLockNotGrantedException class and
35
how it is used by the various Db* classes.
36
<p>A DbLockNotGrantedException is thrown when a lock, requested
37
using the <a href="../api_java/lock_get.html">DbEnv.lock_get</a> or <a href="../api_java/lock_vec.html">DbEnv.lock_vec</a> methods (where the
38
<a href="../api_java/lock_vec.html#DB_LOCK_NOWAIT">Db.DB_LOCK_NOWAIT</a> option was specified), or by any <a href="../api_java/db_class.html">Db</a>
39
operation performed in the context of a transaction begun using the
40
<a href="../api_java/txn_begin.html#DB_TXN_NOWAIT">Db.DB_TXN_NOWAIT</a> option, is unable to be granted immediately.
41
<p>The <b>get_op</b> method returns 0 when <a href="../api_java/lock_get.html">DbEnv.lock_get</a> was called,
42
and returns the <b>op</b> for the failed DbLockRequest when
43
<a href="../api_java/lock_vec.html">DbEnv.lock_vec</a> was called.
44
<p>The <b>get_mode</b> method returns the <b>mode</b> argument when
45
<a href="../api_java/lock_get.html">DbEnv.lock_get</a> was called, and returns the <b>mode</b> for the failed
46
DbLockRequest when <a href="../api_java/lock_vec.html">DbEnv.lock_vec</a> was called.
47
<p>The <b>get_obj</b> method returns the <b>obj</b> argument when
48
<a href="../api_java/lock_get.html">DbEnv.lock_get</a> was called, and returns the <b>obj</b> for the failed
49
DbLockRequest when <a href="../api_java/lock_vec.html">DbEnv.lock_vec</a> was called.
50
<p>The <b>get_lock</b> method returns null when <a href="../api_java/lock_get.html">DbEnv.lock_get</a> was
51
called, and returns the <b>lock</b> in the failed DbLockRequest
52
when <a href="../api_java/lock_vec.html">DbEnv.lock_vec</a> was called.
53
<p>The <b>get_index</b> method returns -1 when <a href="../api_java/lock_get.html">DbEnv.lock_get</a> was
54
called, and returns the index of the failed DbLockRequest
55
when <a href="../api_java/lock_vec.html">DbEnv.lock_vec</a> was called.
57
<table width="100%"><tr><td><br></td><td align=right>
58
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
60
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>