~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/api_cxx/env_set_app_dispatch.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB: DbEnv::set_app_dispatch</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++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<a name="2"><!--meow--></a>
13
 
<table width="100%"><tr valign=top>
14
 
<td>
15
 
<h1>DbEnv::set_app_dispatch</h1>
16
 
</td>
17
 
<td align=right>
18
 
<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>
19
 
</td></tr></table>
20
 
<hr size=1 noshade>
21
 
<tt>
22
 
<h3><pre>
23
 
#include &lt;db_cxx.h&gt;
24
 
<p>
25
 
int
26
 
DbEnv::set_app_dispatch(int (*)(DbEnv *dbenv,
27
 
    Dbt *log_rec, DbLsn *lsn, db_recops op));
28
 
</pre></h3>
29
 
<h1>Description</h1>
30
 
<p>Set the application's method to be called during transaction abort
31
 
and recovery.  This method must return 0 on success and either
32
 
<b>errno</b> or a value outside of the Berkeley DB error name space on
33
 
failure.  It takes four arguments:
34
 
<p><dl compact>
35
 
<p><dt>dbenv  <dd>A Berkeley DB environment.
36
 
<p><dt>log_rec<dd>A log record.
37
 
<p><dt>lsn<dd>A log sequence number.
38
 
<p><dt>op<dd>One of the following values:
39
 
<p><dl compact>
40
 
<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
41
 
committed and to abort those operations that were not; undo the operation
42
 
described by the log record.
43
 
<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
44
 
record.
45
 
<p><dt><a name="DB_TXN_ABORT">DB_TXN_ABORT</a><dd>The log is being read backward during a transaction abort; undo the
46
 
operation described by the log record.
47
 
<p><dt><a name="DB_TXN_APPLY">DB_TXN_APPLY</a><dd>The log is being applied on a replica site; redo the operation
48
 
described by the log record.
49
 
<p><dt><a name="DB_TXN_PRINT">DB_TXN_PRINT</a><dd>The log is being printed for debugging purposes; print the contents of
50
 
this log record in the desired format.
51
 
</dl>
52
 
</dl>
53
 
<p>The DB_TXN_FORWARD_ROLL and DB_TXN_APPLY operations
54
 
frequently imply the same actions, redoing changes that appear in the
55
 
log record, although if a recovery function is to be used on a
56
 
replication client where reads may be taking place concurrently with
57
 
the processing of incoming messages, DB_TXN_APPLY operations
58
 
should also perform appropriate locking.  The macro DB_REDO(op) checks
59
 
that the operation is one of DB_TXN_FORWARD_ROLL or
60
 
DB_TXN_APPLY, and should be used in the recovery code to refer
61
 
to the conditions under which operations should be redone. Similarly,
62
 
the macro DB_UNDO(op) checks if the operation is one of
63
 
DB_TXN_BACKWARD_ROLL or DB_TXN_ABORT.
64
 
<p>The DbEnv::set_app_dispatch method configures operations performed using the specified
65
 
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
66
 
database environment.
67
 
<p>The DbEnv::set_app_dispatch interface may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a>
68
 
interface is called.
69
 
If the database environment already exists when
70
 
<a href="../api_cxx/env_open.html">DbEnv::open</a> is called, the information specified to DbEnv::set_app_dispatch
71
 
must be consistent with the existing environment or corruption can
72
 
occur.
73
 
<p>The DbEnv::set_app_dispatch method either returns a non-zero error value or throws an exception that
74
 
encapsulates a non-zero error value on failure, and returns 0 on success.
75
 
<h1>Errors</h1>
76
 
<p>The DbEnv::set_app_dispatch method may fail and throw an exception or return a non-zero error for the following conditions:
77
 
<p><dl compact>
78
 
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
79
 
<p>Called after <a href="../api_cxx/env_open.html">DbEnv::open</a> was called.
80
 
</dl>
81
 
<p>The DbEnv::set_app_dispatch 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.
82
 
If a catastrophic error has occurred, the DbEnv::set_app_dispatch method may fail and
83
 
either return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> or throw a
84
 
<a href="../api_cxx/runrec_class.html">DbRunRecoveryException</a>,
85
 
in which case all subsequent Berkeley DB calls will fail in the same way.
86
 
<h1>Class</h1>
87
 
<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
88
 
<h1>See Also</h1>
89
 
<a href="../api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a>
90
 
</tt>
91
 
<table width="100%"><tr><td><br></td><td align=right>
92
 
<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>
93
 
</td></tr></table>
94
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
95
 
</body>
96
 
</html>