~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/api_cxx/env_set_tx_recover.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--$Id: env_set_tx_recover.so,v 10.30 2001/05/15 14:44:12 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: DbEnv::set_tx_recover</title>
 
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
 
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
 
9
</head>
 
10
<body bgcolor=white>
 
11
<a name="2"><!--meow--></a>
 
12
<table width="100%"><tr valign=top>
 
13
<td>
 
14
<h1>DbEnv::set_tx_recover</h1>
 
15
</td>
 
16
<td align=right>
 
17
<a href="../api_cxx/cxx_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
18
</td></tr></table>
 
19
<hr size=1 noshade>
 
20
<tt>
 
21
<h3><pre>
 
22
#include &lt;db_cxx.h&gt;
 
23
<p>
 
24
int
 
25
DbEnv::set_tx_recover(int (*)(DbEnv *dbenv,
 
26
    Dbt *log_rec, DbLsn *lsn, db_recops op));
 
27
</pre></h3>
 
28
<h1>Description</h1>
 
29
<p>Set the application's method to be called during transaction abort
 
30
and recovery.  This method must return 0 on success and either
 
31
<b>errno</b> or a value outside of the Berkeley DB error name space on
 
32
failure.  It takes four arguments:
 
33
<p><dl compact>
 
34
<p><dt>dbenv  <dd>A Berkeley DB environment.
 
35
<p><dt>log_rec<dd>A log record.
 
36
<p><dt>lsn<dd>A log sequence number.
 
37
<p><dt>op<dd>One of the following values:
 
38
<p><dl compact>
 
39
<p><dt><a name="DB_TXN_BACKWARD_ROLL">DB_TXN_BACKWARD_ROLL</a><dd>The log is being read backward to determine which transactions have been
 
40
committed and to abort those operations that were not; undo the operation
 
41
described by the log record.
 
42
<p><dt><a name="DB_TXN_FORWARD_ROLL">DB_TXN_FORWARD_ROLL</a><dd>The log is being played forward; redo the operation described by the log
 
43
record.
 
44
<p><dt><a name="DB_TXN_ABORT">DB_TXN_ABORT</a><dd>The log is being read backward during a transaction abort; undo the
 
45
operation described by the log record.
 
46
</dl>
 
47
</dl>
 
48
<p>The DbEnv::set_tx_recover interface may be used only to configure Berkeley DB before
 
49
the <a href="../api_cxx/env_open.html">DbEnv::open</a> interface is called.
 
50
<p>The DbEnv::set_tx_recover method either returns a non-zero error value or throws an exception that
 
51
encapsulates a non-zero error value on failure, and returns 0 on success.
 
52
<h1>Errors</h1>
 
53
<p>The DbEnv::set_tx_recover method may fail and throw an exception or return a non-zero error for the following conditions:
 
54
<p><dl compact>
 
55
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
 
56
<p>Called after <a href="../api_cxx/env_open.html">DbEnv::open</a> was called.
 
57
</dl>
 
58
<p>The DbEnv::set_tx_recover method may fail and throw an exception or return a non-zero error for errors specified for other Berkeley DB and C library or system methods.
 
59
If a catastrophic error has occurred, the DbEnv::set_tx_recover method may fail and either
 
60
return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> or throw an exception encapsulating
 
61
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
 
62
in the same way.
 
63
<h1>Class</h1>
 
64
<a href="../api_cxx/dbenv_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
 
65
<h1>See Also</h1>
 
66
<a href="../api_cxx/env_set_tx_max.html">DbEnv::set_tx_max</a>,
 
67
<a href="../api_cxx/env_set_tx_recover.html">DbEnv::set_tx_recover</a>,
 
68
<a href="../api_cxx/env_set_tx_timestamp.html">DbEnv::set_tx_timestamp</a>,
 
69
<a href="../api_cxx/txn_abort.html">DbTxn::abort</a>,
 
70
<a href="../api_cxx/txn_begin.html">DbEnv::txn_begin</a>,
 
71
<a href="../api_cxx/txn_checkpoint.html">DbEnv::txn_checkpoint</a>,
 
72
<a href="../api_cxx/txn_commit.html">DbTxn::commit</a>,
 
73
<a href="../api_cxx/txn_discard.html">DbTxn::discard</a>,
 
74
<a href="../api_cxx/txn_id.html">DbTxn::id</a>,
 
75
<a href="../api_cxx/txn_prepare.html">DbTxn::prepare</a>,
 
76
<a href="../api_cxx/txn_recover.html">DbEnv::txn_recover</a>,
 
77
and
 
78
<a href="../api_cxx/txn_stat.html">DbEnv::txn_stat</a>.
 
79
</tt>
 
80
<table width="100%"><tr><td><br></td><td align=right>
 
81
<a href="../api_cxx/cxx_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
82
</td></tr></table>
 
83
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
84
</body>
 
85
</html>