Debian Codegraph @

docs/api_reference/C/repset_limit.html

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