• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/programmer_reference/
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>Replication environment IDs</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.html" title="Chapter��12.�� Berkeley DB Replication" />
12    <link rel="next" href="rep_pri.html" title="Replication environment priorities" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Replication environment IDs</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="rep.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��12.��
23		Berkeley DB Replication
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="rep_pri.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="rep_id"></a>Replication environment IDs</h2>
35          </div>
36        </div>
37      </div>
38      <p>Each database environment included in a replication group must have a
39unique identifier for itself and for the other members of the
40replication group.   The identifiers do not need to be global, that is,
41each database environment can assign local identifiers to members of
42the replication group as it encounters them.  For example, given three
43sites: A, B and C, site A might assign the identifiers 1 and 2 to sites
44B and C respectively, while site B might assign the identifiers 301 and
45302 to sites A and C respectively.  Note that it is not wrong to have
46global identifiers, it is just not a requirement.</p>
47      <p>
48    Replication Manager assigns and manages environment IDs on behalf of
49    the application.
50</p>
51      <p>It is the responsibility of a Base API application to label each incoming
52replication message passed to <a href="../api_reference/C/repmessage.html" class="olink">DB_ENV-&gt;rep_process_message()</a> method with the appropriate
53identifier.  Subsequently, Berkeley DB will label outgoing messages to the
54<span class="bold"><strong>send</strong></span> function with those same identifiers.</p>
55      <p>Negative identifiers are reserved for use by Berkeley DB, and should never be
56assigned to environments by the application.  Two of these reserved
57identifiers are intended for application use, as follows:</p>
58      <div class="variablelist">
59        <dl>
60          <dt>
61            <span class="term">
62              <a href="../api_reference/C/reptransport.html#transport_DB_EID_BROADCAST" class="olink">DB_EID_BROADCAST</a>
63            </span>
64          </dt>
65          <dd>
66            <p>
67                The <a href="../api_reference/C/reptransport.html#transport_DB_EID_BROADCAST" class="olink">DB_EID_BROADCAST</a> identifier indicates a message should be
68                broadcast to all members of a replication group.
69            </p>
70          </dd>
71          <dt>
72            <a id="rep_id.DB_EID_INVALID"></a>
73            <span class="term">DB_EID_INVALID</span>
74          </dt>
75          <dd>
76            <p>
77                The DB_EID_INVALID identifier is an invalid environment ID,
78                and may be used to initialize environment ID variables that
79                are subsequently checked for validity.
80            </p>
81          </dd>
82        </dl>
83      </div>
84    </div>
85    <div class="navfooter">
86      <hr />
87      <table width="100%" summary="Navigation footer">
88        <tr>
89          <td width="40%" align="left"><a accesskey="p" href="rep.html">Prev</a>��</td>
90          <td width="20%" align="center">
91            <a accesskey="u" href="rep.html">Up</a>
92          </td>
93          <td width="40%" align="right">��<a accesskey="n" href="rep_pri.html">Next</a></td>
94        </tr>
95        <tr>
96          <td width="40%" align="left" valign="top">Chapter��12.��
97		Berkeley DB Replication
98        ��</td>
99          <td width="20%" align="center">
100            <a accesskey="h" href="index.html">Home</a>
101          </td>
102          <td width="40%" align="right" valign="top">��Replication environment priorities</td>
103        </tr>
104      </table>
105    </div>
106  </body>
107</html>
108