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

« back to all changes in this revision

Viewing changes to db/docs/api_cxx/txn_checkpoint.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_checkpoint.so,v 10.28 2001/04/02 20:10:09 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: DbEnv::txn_checkpoint</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_checkpoint</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::txn_checkpoint(u_int32_t kbyte, u_int32_t min, u_int32_t flags) const;
 
26
</pre></h3>
 
27
<h1>Description</h1>
 
28
<p>The DbEnv::txn_checkpoint method flushes the underlying memory pool,
 
29
writes a checkpoint record to the log, and then flushes the log.
 
30
<p>If either <b>kbyte</b> or <b>min</b> is non-zero, the checkpoint is
 
31
done only if there has been activity since the last checkpoint, and
 
32
either more than <b>min</b> minutes have passed since the last
 
33
checkpoint or if more than <b>kbyte</b> kilobytes of log data have been
 
34
written since the last checkpoint.
 
35
<p>The <b>flags</b> value must be set to 0 or
 
36
the following value:
 
37
<p><dl compact>
 
38
<p><dt><a name="DB_FORCE">DB_FORCE</a><dd>Force a checkpoint record, even if there has been no activity since the
 
39
last checkpoint.
 
40
</dl>
 
41
<p>The DbEnv::txn_checkpoint method either returns a non-zero error value or throws an exception that
 
42
encapsulates a non-zero error value on failure, 0 on success, and returns <a href="../api_c/memp_fsync.html#DB_INCOMPLETE">DB_INCOMPLETE</a> if there were pages that needed to be
 
43
written to complete the checkpoint but that <a href="../api_cxx/memp_sync.html">DbEnv::memp_sync</a> was unable
 
44
to write immediately.
 
45
<h1>Errors</h1>
 
46
<p>The DbEnv::txn_checkpoint method may fail and throw an exception or return a non-zero error for the following conditions:
 
47
<p><dl compact>
 
48
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
 
49
</dl>
 
50
<p>The DbEnv::txn_checkpoint 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.
 
51
If a catastrophic error has occurred, the DbEnv::txn_checkpoint method may fail and either
 
52
return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> or throw an exception encapsulating
 
53
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
 
54
in the same way.
 
55
<h1>Class</h1>
 
56
<a href="../api_cxx/dbenv_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
 
57
<h1>See Also</h1>
 
58
<a href="../api_cxx/env_set_tx_max.html">DbEnv::set_tx_max</a>,
 
59
<a href="../api_cxx/env_set_tx_recover.html">DbEnv::set_tx_recover</a>,
 
60
<a href="../api_cxx/env_set_tx_timestamp.html">DbEnv::set_tx_timestamp</a>,
 
61
<a href="../api_cxx/txn_abort.html">DbTxn::abort</a>,
 
62
<a href="../api_cxx/txn_begin.html">DbEnv::txn_begin</a>,
 
63
<a href="../api_cxx/txn_checkpoint.html">DbEnv::txn_checkpoint</a>,
 
64
<a href="../api_cxx/txn_commit.html">DbTxn::commit</a>,
 
65
<a href="../api_cxx/txn_discard.html">DbTxn::discard</a>,
 
66
<a href="../api_cxx/txn_id.html">DbTxn::id</a>,
 
67
<a href="../api_cxx/txn_prepare.html">DbTxn::prepare</a>,
 
68
<a href="../api_cxx/txn_recover.html">DbEnv::txn_recover</a>,
 
69
and
 
70
<a href="../api_cxx/txn_stat.html">DbEnv::txn_stat</a>.
 
71
</tt>
 
72
<table width="100%"><tr><td><br></td><td align=right>
 
73
<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>
 
74
</td></tr></table>
 
75
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
76
</body>
 
77
</html>