• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/db-4.8.30/docs/api_reference/C/
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>DB_ENV-&gt;rep_set_limit()</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="rep.html" title="Chapter��10.�� Replication Methods" />
11    <link rel="prev" href="repconfig.html" title="DB_ENV-&gt;rep_set_config()" />
12    <link rel="next" href="repnsites.html" title="DB_ENV-&gt;rep_set_nsites()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;rep_set_limit()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="repconfig.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��10.��
23                Replication Methods
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="repnsites.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="repset_limit"></a>DB_ENV-&gt;rep_set_limit()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;rep_set_limit(DB_ENV *env, u_int32_t gbytes, u_int32_t bytes);  </pre>
42      <p>
43         The <code class="methodname">DB_ENV-&gt;rep_set_limit()</code> method sets 
44record transmission throttling. This is a byte-count limit on the
45         amount of data that will be transmitted from a site in response to a
46         single message processed by the 
47         <a class="xref" href="repmessage.html" title="DB_ENV-&gt;rep_process_message()">DB_ENV-&gt;rep_process_message()</a> 
48         method.  The limit is not a hard limit, and the record that exceeds
49         the limit is the last record to be sent.
50    </p>
51      <p>
52         Record transmission throttling is turned on by default with a limit of
53         10MB.
54    </p>
55      <p>
56         If the values passed to the <code class="methodname">DB_ENV-&gt;rep_set_limit()</code> method are both
57         zero, then the transmission limit is turned off.
58    </p>
59      <p>
60         The database environment's replication subsystem may also be configured using the
61         environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file.  The
62         syntax of the entry in that file is a single line with the string "rep_set_limit", one or
63         more whitespace characters, and the limit specified in two parts: the 
64gigabytes and the
65         bytes values. For example, "rep_set_limit 0 1048576" sets a 1 megabyte limit.. Because
66         the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is read when
67         the database environment is opened, it will silently overrule configuration done before
68         that time.
69    </p>
70      <p>
71         The <code class="methodname">DB_ENV-&gt;rep_set_limit()</code> method configures a database environment,
72         not only operations performed using the specified <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  
73         handle.
74    </p>
75      <p>
76         The <code class="methodname">DB_ENV-&gt;rep_set_limit()</code> method may be called at any time during
77         the life of the application.
78    </p>
79      <p>
80         The <code class="methodname">DB_ENV-&gt;rep_set_limit()</code> <span>
81            <span>
82                  method returns a non-zero error value on failure and 0 on success.
83            </span>
84            
85        </span>
86    </p>
87      <div class="sect2" lang="en" xml:lang="en">
88        <div class="titlepage">
89          <div>
90            <div>
91              <h3 class="title"><a id="id1698808"></a>Parameters</h3>
92            </div>
93          </div>
94        </div>
95        <div class="sect3" lang="en" xml:lang="en">
96          <div class="titlepage">
97            <div>
98              <div>
99                <h4 class="title"><a id="id1699061"></a>bytes</h4>
100              </div>
101            </div>
102          </div>
103          <p>
104                         The  <span class="bold"><strong>bytes</strong></span> parameter specifies the number of 
105                         bytes which, when added to the <span class="bold"><strong>gbytes</strong></span>
106                         parameter,  specifies the maximum number of bytes that will be sent in a 
107                         single call to the <a class="xref" href="repmessage.html" title="DB_ENV-&gt;rep_process_message()">DB_ENV-&gt;rep_process_message()</a> 
108                         method.
109                     </p>
110        </div>
111        <div class="sect3" lang="en" xml:lang="en">
112          <div class="titlepage">
113            <div>
114              <div>
115                <h4 class="title"><a id="id1699128"></a>gbytes</h4>
116              </div>
117            </div>
118          </div>
119          <p>
120                         The  <span class="bold"><strong>gbytes</strong></span> parameter specifies the number of 
121                         gigabytes which, when added to the <span class="bold"><strong>bytes</strong></span>
122                         parameter,  specifies the maximum number of bytes that will be sent in a 
123                         single call to the <a class="xref" href="repmessage.html" title="DB_ENV-&gt;rep_process_message()">DB_ENV-&gt;rep_process_message()</a> 
124                         method.
125                     </p>
126        </div>
127      </div>
128      <div class="sect2" lang="en" xml:lang="en">
129        <div class="titlepage">
130          <div>
131            <div>
132              <h3 class="title"><a id="id1699173"></a>Class</h3>
133            </div>
134          </div>
135        </div>
136        <p>
137                <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  
138            </p>
139      </div>
140      <div class="sect2" lang="en" xml:lang="en">
141        <div class="titlepage">
142          <div>
143            <div>
144              <h3 class="title"><a id="id1699177"></a>See Also</h3>
145            </div>
146          </div>
147        </div>
148        <p>
149                     <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a> 
150                </p>
151      </div>
152    </div>
153    <div class="navfooter">
154      <hr />
155      <table width="100%" summary="Navigation footer">
156        <tr>
157          <td width="40%" align="left"><a accesskey="p" href="repconfig.html">Prev</a>��</td>
158          <td width="20%" align="center">
159            <a accesskey="u" href="rep.html">Up</a>
160          </td>
161          <td width="40%" align="right">��<a accesskey="n" href="repnsites.html">Next</a></td>
162        </tr>
163        <tr>
164          <td width="40%" align="left" valign="top">DB_ENV-&gt;rep_set_config()��</td>
165          <td width="20%" align="center">
166            <a accesskey="h" href="index.html">Home</a>
167          </td>
168          <td width="40%" align="right" valign="top">��DB_ENV-&gt;rep_set_nsites()</td>
169        </tr>
170      </table>
171    </div>
172  </body>
173</html>
174