Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / api_reference / CXX / repset_limit.html
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::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()" />
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">DbEnv::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 11. 
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>DbEnv::rep_set_limit()</h2>
38           </div>
39         </div>
40       </div>
41       <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::rep_set_limit(u_int32_t gbytes, u_int32_t bytes); </pre>
45       <p>
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.
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">DbEnv::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">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>
77          handle.
78     </p>
79       <p>
80          The <code class="methodname">DbEnv::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">DbEnv::rep_set_limit()</code> <span>
85             
86             <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.
90             </span>
91         </span>
92     </p>
93       <div class="sect2" lang="en" xml:lang="en">
94         <div class="titlepage">
95           <div>
96             <div>
97               <h3 class="title"><a id="idp4233536"></a>Parameters</h3>
98             </div>
99           </div>
100         </div>
101         <div class="sect3" lang="en" xml:lang="en">
102           <div class="titlepage">
103             <div>
104               <div>
105                 <h4 class="title"><a id="idp4249040"></a>gbytes</h4>
106               </div>
107             </div>
108           </div>
109           <p>
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> 
114                  method.
115              </p>
116         </div>
117         <div class="sect3" lang="en" xml:lang="en">
118           <div class="titlepage">
119             <div>
120               <div>
121                 <h4 class="title"><a id="idp4225512"></a>bytes</h4>
122               </div>
123             </div>
124           </div>
125           <p>
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> 
130                  method.
131              </p>
132         </div>
133       </div>
134       <div class="sect2" lang="en" xml:lang="en">
135         <div class="titlepage">
136           <div>
137             <div>
138               <h3 class="title"><a id="idp4250424"></a>Class</h3>
139             </div>
140           </div>
141         </div>
142         <p>
143             <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>  
144         </p>
145       </div>
146       <div class="sect2" lang="en" xml:lang="en">
147         <div class="titlepage">
148           <div>
149             <div>
150               <h3 class="title"><a id="idp4216016"></a>See Also</h3>
151             </div>
152           </div>
153         </div>
154         <p>
155              <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a> 
156         </p>
157       </div>
158     </div>
159     <div class="navfooter">
160       <hr />
161       <table width="100%" summary="Navigation footer">
162         <tr>
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>
166           </td>
167           <td width="40%" align="right"> <a accesskey="n" href="repnsites.html">Next</a></td>
168         </tr>
169         <tr>
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>
173           </td>
174           <td width="40%" align="right" valign="top"> DbEnv::rep_set_nsites()</td>
175         </tr>
176       </table>
177     </div>
178   </body>
179 </html>