| 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 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">Replication environment IDs</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="rep.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_pri.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_id"></a>Replication environment IDs</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p>Each database environment included in a replication group must have a |
| 42 | unique identifier for itself and for the other members of the |
| 43 | replication group. The identifiers do not need to be global, that is, |
| 44 | each database environment can assign local identifiers to members of |
| 45 | the replication group as it encounters them. For example, given three |
| 46 | sites: A, B and C, site A might assign the identifiers 1 and 2 to sites |
| 47 | B and C respectively, while site B might assign the identifiers 301 and |
| 48 | 302 to sites A and C respectively. Note that it is not wrong to have |
| 49 | global identifiers, it is just not a requirement.</p> |
| 50 | <p> |
| 51 | Replication Manager assigns and manages environment IDs on behalf of |
| 52 | the application. |
| 53 | </p> |
| 54 | <p>It is the responsibility of a Base API application to label each incoming |
| 55 | replication message passed to <a href="../api_reference/C/repmessage.html" class="olink">DB_ENV->rep_process_message()</a> method with the appropriate |
| 56 | identifier. Subsequently, Berkeley DB will label outgoing messages to the |
| 57 | <span class="bold"><strong>send</strong></span> function with those same identifiers.</p> |
| 58 | <p>Negative identifiers are reserved for use by Berkeley DB, and should never be |
| 59 | assigned to environments by the application. Two of these reserved |
| 60 | identifiers are intended for application use, as follows:</p> |
| 61 | <div class="variablelist"> |
| 62 | <dl> |
| 63 | <dt> |
| 64 | <span class="term"> |
| 65 | <a href="../api_reference/C/reptransport.html#transport_DB_EID_BROADCAST" class="olink">DB_EID_BROADCAST</a> |
| 66 | </span> |
| 67 | </dt> |
| 68 | <dd> |
| 69 | <p> |
| 70 | The <a href="../api_reference/C/reptransport.html#transport_DB_EID_BROADCAST" class="olink">DB_EID_BROADCAST</a> identifier indicates a message should be |
| 71 | broadcast to all members of a replication group. |
| 72 | </p> |
| 73 | </dd> |
| 74 | <dt> |
| 75 | <a id="rep_id.DB_EID_INVALID"></a> |
| 76 | <span class="term">DB_EID_INVALID</span> |
| 77 | </dt> |
| 78 | <dd> |
| 79 | <p> |
| 80 | The DB_EID_INVALID identifier is an invalid environment ID, |
| 81 | and may be used to initialize environment ID variables that |
| 82 | are subsequently checked for validity. |
| 83 | </p> |
| 84 | </dd> |
| 85 | </dl> |
| 86 | </div> |
| 87 | </div> |
| 88 | <div class="navfooter"> |
| 89 | <hr /> |
| 90 | <table width="100%" summary="Navigation footer"> |
| 91 | <tr> |
| 92 | <td width="40%" align="left"><a accesskey="p" href="rep.html">Prev</a> </td> |
| 93 | <td width="20%" align="center"> |
| 94 | <a accesskey="u" href="rep.html">Up</a> |
| 95 | </td> |
| 96 | <td width="40%" align="right"> <a accesskey="n" href="rep_pri.html">Next</a></td> |
| 97 | </tr> |
| 98 | <tr> |
| 99 | <td width="40%" align="left" valign="top">Chapter 12. |
| 100 | Berkeley DB Replication |
| 101 | </td> |
| 102 | <td width="20%" align="center"> |
| 103 | <a accesskey="h" href="index.html">Home</a> |
| 104 | </td> |
| 105 | <td width="40%" align="right" valign="top"> Replication environment priorities</td> |
| 106 | </tr> |
| 107 | </table> |
| 108 | </div> |
| 109 | </body> |
| 110 | </html> |