• 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_get_config()</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="logflush.html" title="DbEnv::log_flush()" />
12    <link rel="next" href="logprintf.html" title="DbEnv::log_printf()" />
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_get_config()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="logflush.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="logprintf.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="envlog_get_config"></a>DbEnv::log_get_config()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db_cxx.h&gt;
39
40int
41DbEnv::log_get_config(u_int32_t which, int *onoffp)</pre>
42      <p>
43         The <code class="methodname">DbEnv::log_get_config()</code> method returns whether the specified
44         <span class="bold"><strong>which</strong></span> parameter is currently set or
45         not. You can manage this value using the
46         <a class="xref" href="envlog_set_config.html" title="DbEnv::log_set_config()">DbEnv::log_set_config()</a>
47         method.
48    </p>
49      <p>
50         The <code class="methodname">DbEnv::log_get_config()</code> method may be called at any time during
51         the life of the application.
52    </p>
53      <p>
54         The <code class="methodname">DbEnv::log_get_config()</code> <span>
55            
56            <span>
57                method either returns a non-zero error value or throws an
58                exception that encapsulates a non-zero error value on
59                failure, and returns 0 on success.
60            </span>
61        </span>
62    </p>
63      <div class="sect2" lang="en" xml:lang="en">
64        <div class="titlepage">
65          <div>
66            <div>
67              <h3 class="title"><a id="id1685734"></a>Parameters</h3>
68            </div>
69          </div>
70        </div>
71        <div class="sect3" lang="en" xml:lang="en">
72          <div class="titlepage">
73            <div>
74              <div>
75                <h4 class="title"><a id="id1685315"></a>which</h4>
76              </div>
77            </div>
78          </div>
79          <p>
80                          The <span class="bold"><strong>which</strong></span> parameter is the message
81                          value for which configuration is being checked. Must be set to one of the following values:
82                     </p>
83          <div class="itemizedlist">
84            <ul type="disc">
85              <li>
86                <p><a id="log_get_config_DB_LOG_DIRECT"></a>
87                  <code class="literal">DB_LOG_DIRECT</code>
88            </p>
89                <p>
90                     System buffering is turned off for Berkeley DB log files to avoid double
91                 caching.
92            </p>
93              </li>
94              <li>
95                <p><a id="log_get_config_DB_LOG_DSYNC"></a>
96                  <code class="literal">DB_LOG_DSYNC</code>
97            </p>
98                <p>
99                 Berkeley DB is configured to flush log writes to the backing disk before
100                 returning from the write system call, rather than flushing log writes
101                 explicitly in a separate system call, as necessary.  
102            </p>
103              </li>
104              <li>
105                <p><a id="log_get_config_DB_LOG_AUTO_REMOVE"></a>
106                  <code class="literal">DB_LOG_AUTO_REMOVE</code>
107            </p>
108                <p>
109                 Berkeley DB automatically removes log files that are no
110                 longer needed.
111            </p>
112              </li>
113              <li>
114                <p><a id="log_get_config_DB_LOG_IN_MEMORY"></a>
115                  <code class="literal">DB_LOG_IN_MEMORY</code>
116            </p>
117                <p>
118                 Transaction logs are maintained in memory rather than on disk.  This
119                 means that transactions exhibit the ACI (atomicity, consistency, and
120                 isolation) properties, but not D (durability).
121            </p>
122              </li>
123              <li>
124                <p><a id="log_get_config_DB_LOG_ZERO"></a>
125                  <code class="literal">DB_LOG_ZERO</code>
126            </p>
127                <p>
128                 All pages of a log file are zeroed when that log file is created. 
129            </p>
130              </li>
131            </ul>
132          </div>
133        </div>
134        <div class="sect3" lang="en" xml:lang="en">
135          <div class="titlepage">
136            <div>
137              <div>
138                <h4 class="title"><a id="id1685735"></a>onoffp</h4>
139              </div>
140            </div>
141          </div>
142          <p>
143                          The <span class="bold"><strong>onoffp</strong></span> parameter references
144                          memory into which  the configuration of the specified <span class="bold"><strong>which</strong></span> parameter is copied.
145                     </p>
146          <p>
147                         If the returned <span class="bold"><strong>onoff</strong></span> value is zero, the
148                         parameter is off; otherwise, on.
149                     </p>
150        </div>
151      </div>
152      <div class="sect2" lang="en" xml:lang="en">
153        <div class="titlepage">
154          <div>
155            <div>
156              <h3 class="title"><a id="id1685910"></a>Class</h3>
157            </div>
158          </div>
159        </div>
160        <p>
161                    <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>  
162            </p>
163      </div>
164      <div class="sect2" lang="en" xml:lang="en">
165        <div class="titlepage">
166          <div>
167            <div>
168              <h3 class="title"><a id="id1686124"></a>See Also</h3>
169            </div>
170          </div>
171        </div>
172        <p>
173                        <a class="xref" href="lsn.html#loglist" title="Logging Subsystem and Related Methods">Logging Subsystem and Related Methods</a>, 
174                        <a class="xref" href="envlog_set_config.html" title="DbEnv::log_set_config()">DbEnv::log_set_config()</a>
175                </p>
176      </div>
177    </div>
178    <div class="navfooter">
179      <hr />
180      <table width="100%" summary="Navigation footer">
181        <tr>
182          <td width="40%" align="left"><a accesskey="p" href="logflush.html">Prev</a> </td>
183          <td width="20%" align="center">
184            <a accesskey="u" href="lsn.html">Up</a>
185          </td>
186          <td width="40%" align="right"> <a accesskey="n" href="logprintf.html">Next</a></td>
187        </tr>
188        <tr>
189          <td width="40%" align="left" valign="top">DbEnv::log_flush() </td>
190          <td width="20%" align="center">
191            <a accesskey="h" href="index.html">Home</a>
192          </td>
193          <td width="40%" align="right" valign="top"> DbEnv::log_printf()</td>
194        </tr>
195      </table>
196    </div>
197  </body>
198</html>
199