1<!--$Id: id.so,v 1.9 2007/09/26 15:11:31 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: Replication environment IDs</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Berkeley DB Replication</dl></b></td>
13<td align=right><a href="/rep/intro.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/rep/pri.html"><img src="/images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Replication environment IDs</b></p>
16<p>Each database environment included in a replication group must have a
17unique identifier for itself and for the other members of the
18replication group.   The identifiers do not need to be global, that is,
19each database environment can assign local identifiers to members of
20the replication group as it encounters them.  For example, given three
21sites: A, B and C, site A might assign the identifiers 1 and 2 to sites
22B and C respectively, while site B might assign the identifiers 301 and
23302 to sites A and C respectively.  Note that it is not wrong to have
24global identifiers, it is just not a requirement.</p>
25<p>It is the responsibility of the application to label each incoming
26replication message passed to <a href="/api_c/rep_message.html">DB_ENV-&gt;rep_process_message</a> method with the appropriate
27identifier.  Subsequently, Berkeley DB will label outgoing messages to the
28<b>send</b> function with those same identifiers.</p>
29<p>Negative identifiers are reserved for use by Berkeley DB, and should never be
30assigned to environments by the application.  Two of these reserved
31identifiers are intended for application use, as follows:</p>
32<br>
33<a name="2"><!--meow--></a>
34<b><a href="/api_c/rep_transport.html#DB_EID_BROADCAST">DB_EID_BROADCAST</a></b><ul compact><li>The <a href="/api_c/rep_transport.html#DB_EID_BROADCAST">DB_EID_BROADCAST</a> identifier indicates a message should be
35broadcast to all members of a replication group.</ul>
36<a name="3"><!--meow--></a>
37<b>DB_EID_INVALID</b><ul compact><li>The <a href="/ref/rep/id.html#DB_EID_INVALID">DB_EID_INVALID</a> identifier is an invalid environment ID, and
38may be used to initialize environment ID variables that are subsequently
39checked for validity.</ul>
40<br>
41<p>Replication Manager assigns and manages environment IDs on behalf of
42the application.</p>
43<table width="100%"><tr><td><br></td><td align=right><a href="/rep/intro.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/rep/pri.html"><img src="/images/next.gif" alt="Next"></a>
44</td></tr></table>
45<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
46</body>
47</html>
48