File: lockng_class.html

package info (click to toggle)
db4.7 4.7.25-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 65,844 kB
  • ctags: 43,162
  • sloc: ansic: 155,831; java: 62,154; tcl: 53,808; sh: 14,078; perl: 13,476; cpp: 10,662; cs: 2,660; makefile: 2,629; awk: 1,749; xml: 197; python: 26; php: 22; asm: 14; sed: 9
file content (74 lines) | stat: -rw-r--r-- 4,199 bytes parent folder | download | duplicates (2)
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
67
68
69
70
71
72
73
74
<!--$Id: lockng_class.so,v 1.14 2004/08/13 03:38:57 bostic Exp $-->
<!--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 &lt;db_cxx.h&gt;
<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>