Debian Codegraph @

docs/programmer_reference/rep_base_meth.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>Base API Methods</title>
7 <link rel="stylesheet" href="gettingStarted.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 Programmer's Reference Guide" />
10 <link rel="up" href="rep.html" title="Chapter 12.  Berkeley DB Replication" />
11 <link rel="prev" href="rep_mgr_meth.html" title="Replication Manager methods" />
12 <link rel="next" href="rep_comm.html" title="Building the communications infrastructure" />
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">Base API Methods</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="rep_mgr_meth.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 12. 
26 Berkeley DB Replication
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="rep_comm.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="rep_base_meth"></a>Base API Methods</h2>
38 </div>
39 </div>
40 </div>
41 <p>Base API applications use the following
42 Berkeley DB methods.</p>
43 <div class="variablelist">
44 <dl>
45 <dt>
46 <span class="term">
47 <a href="../api_reference/C/reptransport.html" class="olink">DB_ENV-&gt;rep_set_transport()</a>
48 </span>
49 </dt>
50 <dd>
51 <p>
52 The <a href="../api_reference/C/reptransport.html" class="olink">DB_ENV-&gt;rep_set_transport()</a> method configures the replication system's
53 communications infrastructure.
54 </p>
55 </dd>
56 <dt>
57 <span class="term">
58 <a href="../api_reference/C/repstart.html" class="olink">DB_ENV-&gt;rep_start()</a>
59 </span>
60 </dt>
61 <dd>
62 <p>
63 The <a href="../api_reference/C/repstart.html" class="olink">DB_ENV-&gt;rep_start()</a> method configures (or reconfigures) an existing database
64 environment to be a replication master or client.
65 </p>
66 </dd>
67 <dt>
68 <span class="term">
69 <a href="../api_reference/C/repmessage.html" class="olink">DB_ENV-&gt;rep_process_message()</a>
70 </span>
71 </dt>
72 <dd>
73 <p>
74 The <a href="../api_reference/C/repmessage.html" class="olink">DB_ENV-&gt;rep_process_message()</a> method is used to process incoming messages
75 from other environments in the replication group. For clients,
76 it is responsible for accepting log records and updating the
77 local databases based on messages from the master. For both
78 the master and the clients, it is responsible for handling
79 administrative functions (for example, the protocol for dealing
80 with lost messages), and permitting new clients to join an
81 active replication group. This method should only be called
82 after the replication system's communications infrastructure
83 has been configured via <a href="../api_reference/C/reptransport.html" class="olink">DB_ENV-&gt;rep_set_transport()</a>.
84 </p>
85 </dd>
86 <dt>
87 <span class="term">
88 <a href="../api_reference/C/repelect.html" class="olink">DB_ENV-&gt;rep_elect()</a>
89 </span>
90 </dt>
91 <dd>
92 <p>
93 The <a href="../api_reference/C/repelect.html" class="olink">DB_ENV-&gt;rep_elect()</a> method causes the replication group to elect a
94 new master; it is called whenever contact with the master is
95 lost and the application wants the remaining sites to select a
96 new master.
97 </p>
98 </dd>
99 <dt>
100 <span class="term">
101 <a href="../api_reference/C/envevent_notify.html" class="olink">DB_ENV-&gt;set_event_notify()</a>
102 </span>
103 </dt>
104 <dd>
105 <p>
106 The <a href="../api_reference/C/envevent_notify.html" class="olink">DB_ENV-&gt;set_event_notify()</a> method is needed for applications to
107 discover important replication-related events, such as the
108 result of an election and appointment of a new master.
109 </p>
110 </dd>
111 <dt>
112 <span class="term">
113 <a href="../api_reference/C/reppriority.html" class="olink">DB_ENV-&gt;rep_set_priority()</a>
114 </span>
115 </dt>
116 <dd>
117 <p>
118 The <a href="../api_reference/C/reppriority.html" class="olink">DB_ENV-&gt;rep_set_priority()</a> method configures the local site's priority for
119 the purpose of elections.
120 </p>
121 </dd>
122 <dt>
123 <span class="term">
124 <a href="../api_reference/C/repset_timeout.html" class="olink">DB_ENV-&gt;rep_set_timeout()</a>
125 </span>
126 </dt>
127 <dd>
128 <p>
129 This method optionally configures various timeout values. Otherwise
130 default timeout values as specified in <a href="../api_reference/C/repset_timeout.html" class="olink">DB_ENV-&gt;rep_set_timeout()</a> are
131 used.
132 </p>
133 </dd>
134 <dt>
135 <span class="term">
136 <a href="../api_reference/C/repset_limit.html" class="olink">DB_ENV-&gt;rep_set_limit()</a>
137 </span>
138 </dt>
139 <dd>
140 <p>
141 The <a href="../api_reference/C/repset_limit.html" class="olink">DB_ENV-&gt;rep_set_limit()</a> method imposes an upper bound on the amount of
142 data that will be sent in response to a single call to
143 <a href="../api_reference/C/repmessage.html" class="olink">DB_ENV-&gt;rep_process_message()</a>. During client recovery, that is, when a replica
144 site is trying to synchronize with the master, clients may ask
145 the master for a large number of log records. If it is going
146 to harm an application for the master message loop to remain
147 busy for an extended period transmitting records to the
148 replica, then the application will want to use <a href="../api_reference/C/repset_limit.html" class="olink">DB_ENV-&gt;rep_set_limit()</a> to
149 limit the amount of data the master will send before
150 relinquishing control and accepting other messages.
151 </p>
152 </dd>
153 <dt>
154 <span class="term">
155 <a href="../api_reference/C/repset_request.html" class="olink">DB_ENV-&gt;rep_set_request()</a>
156 </span>
157 </dt>
158 <dd>
159 <p>
160 This method sets a threshold for the minimum and maximum time that
161 a client waits before requesting retransmission of a missing
162 message.
163 </p>
164 </dd>
165 </dl>
166 </div>
167 <p>In addition to the methods previously described, Base API applications
168 may also call the following methods, as needed:
169 <a href="../api_reference/C/repstat.html" class="olink">DB_ENV-&gt;rep_stat()</a>, <a href="../api_reference/C/repsync.html" class="olink">DB_ENV-&gt;rep_sync()</a> and <a href="../api_reference/C/repconfig.html" class="olink">DB_ENV-&gt;rep_set_config()</a>.</p>
170 </div>
171 <div class="navfooter">
172 <hr />
173 <table width="100%" summary="Navigation footer">
174 <tr>
175 <td width="40%" align="left"><a accesskey="p" href="rep_mgr_meth.html">Prev</a> </td>
176 <td width="20%" align="center">
177 <a accesskey="u" href="rep.html">Up</a>
178 </td>
179 <td width="40%" align="right"> <a accesskey="n" href="rep_comm.html">Next</a></td>
180 </tr>
181 <tr>
182 <td width="40%" align="left" valign="top">Replication Manager methods </td>
183 <td width="20%" align="center">
184 <a accesskey="h" href="index.html">Home</a>
185 </td>
186 <td width="40%" align="right" valign="top"> Building the communications infrastructure</td>
187 </tr>
188 </table>
189 </div>
190 </body>
191 </html>