id.html   [plain text]


<!--$Id: id.so,v 1.9 2007/09/26 15:11:31 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Replication environment IDs</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Berkeley DB Replication</dl></b></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>
</td></tr></table>
<p align=center><b>Replication environment IDs</b></p>
<p>Each database environment included in a replication group must have a
unique identifier for itself and for the other members of the
replication group.   The identifiers do not need to be global, that is,
each database environment can assign local identifiers to members of
the replication group as it encounters them.  For example, given three
sites: A, B and C, site A might assign the identifiers 1 and 2 to sites
B and C respectively, while site B might assign the identifiers 301 and
302 to sites A and C respectively.  Note that it is not wrong to have
global identifiers, it is just not a requirement.</p>
<p>It is the responsibility of the application to label each incoming
replication message passed to <a href="../../api_c/rep_message.html">DB_ENV-&gt;rep_process_message</a> method with the appropriate
identifier.  Subsequently, Berkeley DB will label outgoing messages to the
<b>send</b> function with those same identifiers.</p>
<p>Negative identifiers are reserved for use by Berkeley DB, and should never be
assigned to environments by the application.  Two of these reserved
identifiers are intended for application use, as follows:</p>
<br>
<a name="2"><!--meow--></a>
<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
broadcast to all members of a replication group.</ul>
<a name="3"><!--meow--></a>
<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
may be used to initialize environment ID variables that are subsequently
checked for validity.</ul>
<br>
<p>Replication Manager assigns and manages environment IDs on behalf of
the application.</p>
<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>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>