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

« back to all changes in this revision

Viewing changes to db/docs/api_java/txn_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: txn_recover.so,v 10.7 2001/07/11 14:22:31 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: DbEnv.txn_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.txn_recover</h1>
 
15
</td>
 
16
<td align=right>
 
17
<a href="../api_java/java_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
import com.sleepycat.db.*;
 
23
<p>
 
24
public DbPreplist[] txn_recover(int count, int flags)
 
25
        throws DbException;
 
26
</pre></h3>
 
27
<h1>Description</h1>
 
28
<p>The DbEnv.txn_recover interface returns a list of prepared but not
 
29
yet resolved transactions.  The DbEnv.txn_recover method should only be
 
30
called after the environment has been recovered.  Because database
 
31
environment state must be preserved between recovery and the application
 
32
calling DbEnv.txn_recover, applications must either call
 
33
DbEnv.txn_recover using the same environment handle used when recovery
 
34
is done, or the database environment must not be configured using the
 
35
<a href="../api_java/env_open.html#DB_PRIVATE">Db.DB_PRIVATE</a> flag.
 
36
<p>The DbEnv.txn_recover method returns a list of transactions that must be
 
37
resolved by the application (committed, aborted or discarded).  The
 
38
return value is an array of objects of type DbPreplist; the following
 
39
DbPreplist fields will be filled in:
 
40
<p><dl compact>
 
41
<p><dt>public DbTxn txn;<dd>The transaction handle for the transaction.
 
42
<p><dt>public byte[] gid;<dd>The global transaction ID for the transaction.  The global transaction
 
43
ID is the one specified when the transaction was prepared.  The
 
44
application is responsible for ensuring uniqueness among global
 
45
transaction IDs.
 
46
</dl>
 
47
<p>The application must call <a href="../api_java/txn_abort.html">DbTxn.abort</a>, <a href="../api_java/txn_commit.html">DbTxn.commit</a> or
 
48
<a href="../api_java/txn_discard.html">DbTxn.discard</a> on each returned <a href="../api_java/txn_class.html">DbTxn</a> handle before
 
49
starting any new operations.
 
50
<p>The <b>count</b> parameter specifies the number of maximum size of the
 
51
array that should be returned.
 
52
<p>The <b>flags</b> value must be set to one of the following values:
 
53
<p><dl compact>
 
54
<p><dt><a name="Db.DB_FIRST">Db.DB_FIRST</a><dd>Begin returning a list of prepared, but not yet resolved transactions.
 
55
<p><dt><a name="Db.DB_NEXT">Db.DB_NEXT</a><dd>Continue returning a list of prepared, but not yet resolved transactions,
 
56
starting where the last call to DbEnv.txn_recover left off.
 
57
</dl>
 
58
<p>The DbEnv.txn_recover method throws an exception that encapsulates a non-zero error value on
 
59
failure.
 
60
<h1>Errors</h1>
 
61
<p>The DbEnv.txn_recover method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
 
62
If a catastrophic error has occurred, the DbEnv.txn_recover method may fail and throw
 
63
a <a href="../api_java/runrec_class.html">DbRunRecoveryException</a>, in which case all subsequent Berkeley DB calls
 
64
will fail in the same way.
 
65
<h1>Class</h1>
 
66
<a href="../api_java/dbenv_class.html">DbEnv</a>, <a href="../api_java/txn_class.html">DbTxn</a>
 
67
<h1>See Also</h1>
 
68
<a href="../api_java/env_set_tx_max.html">DbEnv.set_tx_max</a>,
 
69
<a href="../api_java/env_set_tx_timestamp.html">DbEnv.set_tx_timestamp</a>,
 
70
<a href="../api_java/txn_abort.html">DbTxn.abort</a>,
 
71
<a href="../api_java/txn_begin.html">DbEnv.txn_begin</a>,
 
72
<a href="../api_java/txn_checkpoint.html">DbEnv.txn_checkpoint</a>,
 
73
<a href="../api_java/txn_commit.html">DbTxn.commit</a>,
 
74
<a href="../api_java/txn_discard.html">DbTxn.discard</a>,
 
75
<a href="../api_java/txn_id.html">DbTxn.id</a>,
 
76
<a href="../api_java/txn_prepare.html">DbTxn.prepare</a>,
 
77
<a href="../api_java/txn_recover.html">DbEnv.txn_recover</a>,
 
78
and
 
79
<a href="../api_java/txn_stat.html">DbEnv.txn_stat</a>.
 
80
</tt>
 
81
<table width="100%"><tr><td><br></td><td align=right>
 
82
<a href="../api_java/java_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
83
</td></tr></table>
 
84
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
85
</body>
 
86
</html>