Debian Codegraph @

docs/api_reference/CXX/dbsite_set_config.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>DbSite::set_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="rep.html" title="Chapter 11.  Replication Methods" />
11 <link rel="prev" href="dbsite_remove.html" title="DbSite::remove()" />
12 <link rel="next" href="repelect.html" title="DbEnv::rep_elect()" />
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">DbSite::set_config()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbsite_remove.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="repelect.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="dbsite_set_config"></a>DbSite::set_config()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbSite::set_config(u_int32_t which, u_int32_t value);</pre>
45 <p>
46 The <code class="methodname">DbSite::set_config()</code> method configures
47 a Replication Manager site.
48 </p>
49 <p>
50 The <code class="methodname">DbSite::set_config()</code> <span>
51
52 <span>
53 method either returns a non-zero error value or throws an
54 exception that encapsulates a non-zero error value on
55 failure, and returns 0 on success.
56 </span>
57 </span>
58 </p>
59 <p>
60 The Replication Manager site may also be configured using the
61 environment's DB_CONFIG file. The syntax of the entry in that file
62 is described in
63 <a class="xref" href="repmgr_site_parameter.html" title="repmgr_site">repmgr_site</a>.
64 </p>
65 <div class="sect2" lang="en" xml:lang="en">
66 <div class="titlepage">
67 <div>
68 <div>
69 <h3 class="title"><a id="idp9419696"></a>Parameters</h3>
70 </div>
71 </div>
72 </div>
73 <div class="sect3" lang="en" xml:lang="en">
74 <div class="titlepage">
75 <div>
76 <div>
77 <h4 class="title"><a id="idp9419888"></a>which</h4>
78 </div>
79 </div>
80 </div>
81 <p>
82 This parameter must be set to one of the following
83 values:
84 </p>
85 <div class="itemizedlist">
86 <ul type="disc">
87 <li>
88 <p><a id="DB_BOOTSTRAP_HELPER"></a>
89 <code class="literal">DB_BOOTSTRAP_HELPER</code>
90 </p>
91 <p>
92 Specifies that a remote site may be used as a
93 "helper" when the local site is first joining the
94 replication group. Once the local site has been
95 established as a member of the group, this
96 setting is ignored.
97 </p>
98 </li>
99 <li>
100 <p><a id="DB_GROUP_CREATOR"></a>
101 <code class="literal">DB_GROUP_CREATOR</code>
102 </p>
103 <p>
104 Specifies that this site should create the
105 initial membership database contents, defining a
106 "group" of just the one site, rather than trying to
107 join an existing group when it starts for the first
108 time.
109 </p>
110 <p>
111 This setting can only be used on the local site and
112 is ignored when configured for a remote site.
113 </p>
114 </li>
115 <li>
116 <p><a id="DB_LEGACY"></a>
117 <code class="literal">DB_LEGACY</code>
118 </p>
119 <p>
120 Specifies that the site is already part of an
121 existing group. This setting causes the site to be
122 upgraded from a previous version of BDB. All sites
123 in the legacy group must specify this setting for
124 themselves (the local site) and for all other sites
125 currently existing in the group. Once the upgrade
126 has been completed, this setting is no longer
127 required.
128 </p>
129 </li>
130 <li>
131 <p><a id="DB_LOCAL_SITE"></a>
132 <code class="literal">DB_LOCAL_SITE</code>
133 </p>
134 <p>
135 Specifies that this site is the local site within
136 the replication group. The application must
137 identify exactly one site as the local site in this
138 way, before calling the
139 <a class="xref" href="repmgrstart.html" title="DbEnv::repmgr_start()">DbEnv::repmgr_start()</a>
140 method.
141 </p>
142 </li>
143 <li>
144 <p><a id="DB_REPMGR_PEER"></a>
145 <code class="literal">DB_REPMGR_PEER</code>
146 </p>
147 <p>
148 Specifies that the site may be used as a target for
149 "client-to-client" synchronization messages. This
150 setting is ignored if it is specified for the local
151 site.
152 </p>
153 </li>
154 </ul>
155 </div>
156 </div>
157 <div class="sect3" lang="en" xml:lang="en">
158 <div class="titlepage">
159 <div>
160 <div>
161 <h4 class="title"><a id="idp9426272"></a>value</h4>
162 </div>
163 </div>
164 </div>
165 <p>
166 If <code class="literal">0</code>, the parameter identified by the <span class="bold"><strong>which</strong></span> is turned off. Otherwise,
167 it is turned on.
168 </p>
169 </div>
170 </div>
171 <div class="sect2" lang="en" xml:lang="en">
172 <div class="titlepage">
173 <div>
174 <div>
175 <h3 class="title"><a id="idp9427352"></a>Errors</h3>
176 </div>
177 </div>
178 </div>
179 <p>
180 The <code class="methodname">DbSite::set_config()</code> <span>
181
182 <span>
183 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
184 exception, encapsulating one of the following non-zero errors, or return one
185 of the following non-zero errors:
186 </span>
187 </span>
188 </p>
189 <div class="sect3" lang="en" xml:lang="en">
190 <div class="titlepage">
191 <div>
192 <div>
193 <h4 class="title"><a id="idp9435072"></a>EINVAL</h4>
194 </div>
195 </div>
196 </div>
197 <p>
198 If an invalid flag value or parameter was specified.
199 </p>
200 </div>
201 </div>
202 <div class="sect2" lang="en" xml:lang="en">
203 <div class="titlepage">
204 <div>
205 <div>
206 <h3 class="title"><a id="idp9421024"></a>Class</h3>
207 </div>
208 </div>
209 </div>
210 <p>
211 <a class="link" href="db_site.html" title="The DbSite Handle">DbSite</a>
212 </p>
213 </div>
214 <div class="sect2" lang="en" xml:lang="en">
215 <div class="titlepage">
216 <div>
217 <div>
218 <h3 class="title"><a id="idp9428032"></a>See Also</h3>
219 </div>
220 </div>
221 </div>
222 <p>
223 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a>
224 </p>
225 </div>
226 </div>
227 <div class="navfooter">
228 <hr />
229 <table width="100%" summary="Navigation footer">
230 <tr>
231 <td width="40%" align="left"><a accesskey="p" href="dbsite_remove.html">Prev</a> </td>
232 <td width="20%" align="center">
233 <a accesskey="u" href="rep.html">Up</a>
234 </td>
235 <td width="40%" align="right"> <a accesskey="n" href="repelect.html">Next</a></td>
236 </tr>
237 <tr>
238 <td width="40%" align="left" valign="top">DbSite::remove() </td>
239 <td width="20%" align="center">
240 <a accesskey="h" href="index.html">Home</a>
241 </td>
242 <td width="40%" align="right" valign="top"> DbEnv::rep_elect()</td>
243 </tr>
244 </table>
245 </div>
246 </body>
247 </html>