Debian Codegraph @

docs/api_reference/C/repsync.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_sync()</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="repstat_print.html" title="DB_ENV-&gt;rep_stat_print()" />
12 <link rel="next" href="repmgr_channel.html" title="DB_ENV-&gt;repmgr_channel()" />
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_sync()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="repstat_print.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="repmgr_channel.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="repsync"></a>DB_ENV-&gt;rep_sync()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;rep_sync(DB_ENV *env, u_int32_t flags); </pre>
45 <p>
46 The <code class="methodname">DB_ENV-&gt;rep_sync()</code> method forces master synchronization to begin
47 for this client. This method is the other half of setting the
48 <a class="link" href="repconfig.html#config_DB_REP_CONF_DELAYCLIENT">DB_REP_CONF_DELAYCLIENT</a>
49 flag via the <a class="xref" href="repconfig.html" title="DB_ENV-&gt;rep_set_config()">DB_ENV-&gt;rep_set_config()</a>
50 method.
51 </p>
52 <p>
53 If an application has configured delayed master synchronization, the
54 application must synchronize explicitly (otherwise the client will
55 remain out-of-date and will ignore all database changes forwarded from
56 the replication group master). The <code class="methodname">DB_ENV-&gt;rep_sync()</code> method may be
57 called any time after the client application learns that the new
58 master has been established (by receiving a
59 <a class="link" href="envevent_notify.html#event_notify_DB_EVENT_REP_NEWMASTER">DB_EVENT_REP_NEWMASTER</a>
60 event notification).
61 </p>
62 <p>
63 Before calling this method, the enclosing database environment must
64 already have been opened by calling the
65 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> method and must
66 already have been configured to send replication messages by
67 calling the <a class="xref" href="reptransport.html" title="DB_ENV-&gt;rep_set_transport()">DB_ENV-&gt;rep_set_transport()</a>
68 method.
69 </p>
70 <p>
71 The <code class="methodname">DB_ENV-&gt;rep_sync()</code> <span>
72 <span>
73 method returns a non-zero error value on failure and 0 on success.
74 </span>
75
76 </span>
77 </p>
78 <div class="sect2" lang="en" xml:lang="en">
79 <div class="titlepage">
80 <div>
81 <div>
82 <h3 class="title"><a id="idp54340976"></a>Parameters</h3>
83 </div>
84 </div>
85 </div>
86 <div class="sect3" lang="en" xml:lang="en">
87 <div class="titlepage">
88 <div>
89 <div>
90 <h4 class="title"><a id="idp54333320"></a>flags</h4>
91 </div>
92 </div>
93 </div>
94 <p>
95 The <span class="bold"><strong>flags</strong></span> parameter is currently
96 unused, and must be set to 0.
97 </p>
98 </div>
99 </div>
100 <div class="sect2" lang="en" xml:lang="en">
101 <div class="titlepage">
102 <div>
103 <div>
104 <h3 class="title"><a id="idp54348440"></a>Errors</h3>
105 </div>
106 </div>
107 </div>
108 <p>
109 The <code class="methodname">DB_ENV-&gt;rep_sync()</code> <span>
110 <span>
111 method may fail and return one of the following non-zero errors:
112 </span>
113
114 </span>
115 </p>
116 <div class="sect3" lang="en" xml:lang="en">
117 <div class="titlepage">
118 <div>
119 <div>
120 <h4 class="title"><a id="idp54346864"></a>EINVAL</h4>
121 </div>
122 </div>
123 </div>
124 <p>
125 If the database environment was not already configured to communicate
126 with a replication group by a call to
127 <a class="xref" href="reptransport.html" title="DB_ENV-&gt;rep_set_transport()">DB_ENV-&gt;rep_set_transport()</a>;
128 the database environment was not already opened;
129 or if an invalid flag value or parameter was specified.
130 </p>
131 </div>
132 </div>
133 <div class="sect2" lang="en" xml:lang="en">
134 <div class="titlepage">
135 <div>
136 <div>
137 <h3 class="title"><a id="idp54337968"></a>Class</h3>
138 </div>
139 </div>
140 </div>
141 <p>
142 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
143 </p>
144 </div>
145 <div class="sect2" lang="en" xml:lang="en">
146 <div class="titlepage">
147 <div>
148 <div>
149 <h3 class="title"><a id="idp54355736"></a>See Also</h3>
150 </div>
151 </div>
152 </div>
153 <p>
154 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a>
155 </p>
156 </div>
157 </div>
158 <div class="navfooter">
159 <hr />
160 <table width="100%" summary="Navigation footer">
161 <tr>
162 <td width="40%" align="left"><a accesskey="p" href="repstat_print.html">Prev</a> </td>
163 <td width="20%" align="center">
164 <a accesskey="u" href="rep.html">Up</a>
165 </td>
166 <td width="40%" align="right"> <a accesskey="n" href="repmgr_channel.html">Next</a></td>
167 </tr>
168 <tr>
169 <td width="40%" align="left" valign="top">DB_ENV-&gt;rep_stat_print() </td>
170 <td width="20%" align="center">
171 <a accesskey="h" href="index.html">Home</a>
172 </td>
173 <td width="40%" align="right" valign="top"> DB_ENV-&gt;repmgr_channel()</td>
174 </tr>
175 </table>
176 </div>
177 </body>
178 </html>