• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/docs/api_reference/CXX/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>DbEnv::log_flush()</title>
7    <link rel="stylesheet" href="apiReference.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10    <link rel="up" href="lsn.html" title="Chapter 8.  The DbLsn Handle" />
11    <link rel="prev" href="logfile.html" title="DbEnv::log_file()" />
12    <link rel="next" href="envlog_get_config.html" title="DbEnv::log_get_config()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DbEnv::log_flush()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="logfile.html">Prev</a> </td>
22          <th width="60%" align="center">Chapter 8. 
23                The DbLsn Handle
24        </th>
25          <td width="20%" align="right"> <a accesskey="n" href="envlog_get_config.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="logflush"></a>DbEnv::log_flush()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39 
40int
41DbEnv::log_flush(const DbLsn *lsn);</pre>
42      <p>
43        The <code class="methodname">DbEnv::log_flush()</code> method writes log records to disk.
44    </p>
45      <p>
46         The <code class="methodname">DbEnv::log_flush()</code> <span>
47            
48            <span>
49                method either returns a non-zero error value or throws an
50                exception that encapsulates a non-zero error value on
51                failure, and returns 0 on success.
52            </span>
53        </span>
54    </p>
55      <div class="sect2" lang="en" xml:lang="en">
56        <div class="titlepage">
57          <div>
58            <div>
59              <h3 class="title"><a id="id1684946"></a>Parameters</h3>
60            </div>
61          </div>
62        </div>
63        <div class="sect3" lang="en" xml:lang="en">
64          <div class="titlepage">
65            <div>
66              <div>
67                <h4 class="title"><a id="id1685172"></a>lsn</h4>
68              </div>
69            </div>
70          </div>
71          <p>
72                          All log records with <a class="link" href="lsn.html" title="Chapter 8.  The DbLsn Handle">DbLsn</a>  
73                          values less than or equal
74                          to the <span class="bold"><strong>lsn</strong></span> parameter are written to
75                          disk.  If <span class="bold"><strong>lsn</strong></span> is NULL, all records in
76                          the log are flushed.
77                     </p>
78        </div>
79      </div>
80      <div class="sect2" lang="en" xml:lang="en">
81        <div class="titlepage">
82          <div>
83            <div>
84              <h3 class="title"><a id="id1685214"></a>Errors</h3>
85            </div>
86          </div>
87        </div>
88        <p>
89                         The <code class="methodname">DbEnv::log_flush()</code> <span>
90            
91            <span>
92                method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a> 
93                exception, encapsulating one of the following non-zero errors, or return one
94                of the following non-zero errors:
95            </span>
96        </span>
97                    </p>
98        <div class="sect3" lang="en" xml:lang="en">
99          <div class="titlepage">
100            <div>
101              <div>
102                <h4 class="title"><a id="id1685640"></a>EINVAL</h4>
103              </div>
104            </div>
105          </div>
106          <p>
107                An invalid flag value or parameter was specified.
108            </p>
109        </div>
110      </div>
111      <div class="sect2" lang="en" xml:lang="en">
112        <div class="titlepage">
113          <div>
114            <div>
115              <h3 class="title"><a id="id1685641"></a>Class</h3>
116            </div>
117          </div>
118        </div>
119        <p>
120                    <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>, 
121                    <a class="link" href="logc.html" title="The DbLogc Handle">DbLogc</a>, 
122                    <a class="link" href="lsn.html" title="Chapter 8.  The DbLsn Handle">DbLsn</a> 
123            </p>
124      </div>
125      <div class="sect2" lang="en" xml:lang="en">
126        <div class="titlepage">
127          <div>
128            <div>
129              <h3 class="title"><a id="id1685766"></a>See Also</h3>
130            </div>
131          </div>
132        </div>
133        <p>
134                     <a class="xref" href="lsn.html#loglist" title="Logging Subsystem and Related Methods">Logging Subsystem and Related Methods</a> 
135                </p>
136      </div>
137    </div>
138    <div class="navfooter">
139      <hr />
140      <table width="100%" summary="Navigation footer">
141        <tr>
142          <td width="40%" align="left"><a accesskey="p" href="logfile.html">Prev</a> </td>
143          <td width="20%" align="center">
144            <a accesskey="u" href="lsn.html">Up</a>
145          </td>
146          <td width="40%" align="right"> <a accesskey="n" href="envlog_get_config.html">Next</a></td>
147        </tr>
148        <tr>
149          <td width="40%" align="left" valign="top">DbEnv::log_file() </td>
150          <td width="20%" align="center">
151            <a accesskey="h" href="index.html">Home</a>
152          </td>
153          <td width="40%" align="right" valign="top"> DbEnv::log_get_config()</td>
154        </tr>
155      </table>
156    </div>
157  </body>
158</html>
159