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">
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbEnv::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 11. Replication Methods" />
11 <link rel="prev" href="repconfig.html" title="DbEnv::rep_set_config()" />
12 <link rel="next" href="repnsites.html" title="DbEnv::rep_set_nsites()" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">DbEnv::rep_set_limit()</th>
24 <td width="20%" align="left"><a accesskey="p" href="repconfig.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 11.
28 <td width="20%" align="right"> <a accesskey="n" href="repnsites.html">Next</a></td>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
37 <h2 class="title" style="clear: both"><a id="repset_limit"></a>DbEnv::rep_set_limit()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
44 DbEnv::rep_set_limit(u_int32_t gbytes, u_int32_t bytes); </pre>
46 The <code class="methodname">DbEnv::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="DbEnv::rep_process_message()">DbEnv::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.
55 Record transmission throttling is turned on by default with a limit of
59 If the values passed to the <code class="methodname">DbEnv::rep_set_limit()</code>
60 method are both zero, then the transmission limit is turned off.
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
74 The <code class="methodname">DbEnv::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 DbEnv Handle">DbEnv</a>
80 The <code class="methodname">DbEnv::rep_set_limit()</code> method may be
81 called at any time during the life of the application.
84 The <code class="methodname">DbEnv::rep_set_limit()</code> <span>
87 method either returns a non-zero error value or throws an
88 exception that encapsulates a non-zero error value on
89 failure, and returns 0 on success.
93 <div class="sect2" lang="en" xml:lang="en">
94 <div class="titlepage">
97 <h3 class="title"><a id="idp4233536"></a>Parameters</h3>
101 <div class="sect3" lang="en" xml:lang="en">
102 <div class="titlepage">
105 <h4 class="title"><a id="idp4249040"></a>gbytes</h4>
110 The <span class="bold"><strong>gbytes</strong></span> parameter specifies the number of
111 gigabytes which, when added to the <span class="bold"><strong>bytes</strong></span>
112 parameter, specifies the maximum number of bytes that will be sent in a
113 single call to the <a class="xref" href="repmessage.html" title="DbEnv::rep_process_message()">DbEnv::rep_process_message()</a>
117 <div class="sect3" lang="en" xml:lang="en">
118 <div class="titlepage">
121 <h4 class="title"><a id="idp4225512"></a>bytes</h4>
126 The <span class="bold"><strong>bytes</strong></span> parameter specifies the number of
127 bytes which, when added to the <span class="bold"><strong>gbytes</strong></span>
128 parameter, specifies the maximum number of bytes that will be sent in a
129 single call to the <a class="xref" href="repmessage.html" title="DbEnv::rep_process_message()">DbEnv::rep_process_message()</a>
134 <div class="sect2" lang="en" xml:lang="en">
135 <div class="titlepage">
138 <h3 class="title"><a id="idp4250424"></a>Class</h3>
143 <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>
146 <div class="sect2" lang="en" xml:lang="en">
147 <div class="titlepage">
150 <h3 class="title"><a id="idp4216016"></a>See Also</h3>
155 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a>
159 <div class="navfooter">
161 <table width="100%" summary="Navigation footer">
163 <td width="40%" align="left"><a accesskey="p" href="repconfig.html">Prev</a> </td>
164 <td width="20%" align="center">
165 <a accesskey="u" href="rep.html">Up</a>
167 <td width="40%" align="right"> <a accesskey="n" href="repnsites.html">Next</a></td>
170 <td width="40%" align="left" valign="top">DbEnv::rep_set_config() </td>
171 <td width="20%" align="center">
172 <a accesskey="h" href="index.html">Home</a>
174 <td width="40%" align="right" valign="top"> DbEnv::rep_set_nsites()</td>