1<!--$Id: repmgr_remote_site.so,v 1.5 2006/09/08 18:33:38 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: DbEnv::repmgr_add_remote_site</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> 13<b>DbEnv::repmgr_add_remote_site</b> 14</td> 15<td align=right> 16<a href="/api_cxx/api_core.html"><img src="/images/api.gif" alt="API"></a> 17<a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db_cxx.h> 23<p> 24int 25DbEnv::repmgr_add_remote_site(const char *host, u_int port, int *eidp, u_int32_t flags); 26</pre></b> 27<hr size=1 noshade> 28<b>Description: DbEnv::repmgr_add_remote_site</b> 29<p>The DbEnv::repmgr_add_remote_site method adds a new replication site to the 30replication manager's list of known sites. It is not necessary for 31all sites in a replication group to know about all other sites in the 32group.</p> 33<p>The DbEnv::repmgr_add_remote_site method may be called at any time during the life of the 34application.</p> 35<p>The DbEnv::repmgr_add_remote_site method 36either returns a non-zero error value 37or throws an exception that encapsulates a non-zero error value on 38failure, and returns 0 on success. 39</p> 40<b>Parameters</b> <br> 41 <b>eidp</b><ul compact><li>If <b>eidp</b> is non-NULL, the 42environment ID assigned to the remote site is 43returned in the memory location referenced by <b>eidp</b>.</ul> 44<b><b>flags</b></b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one 45or more of the following values: 46<br> 47<b><a name="DB_REPMGR_PEER">DB_REPMGR_PEER</a></b><ul compact><li>Specifying the DB_REPMGR_PEER flag configures client-to-client 48synchronization with the specified remote site. 49<p>Currently, the replication manager framework only supports a single client 50peer, and the last specified peer is used.</p></ul> 51<br></ul> 52 <b>host</b><ul compact><li>The site's host identification string, generally a TCP/IP host name.</ul> 53 <b>port</b><ul compact><li>The port number on which the remote site is receiving.</ul> 54<br> 55<hr size=1 noshade> 56<br><b>Class</b> 57<a href="/api_cxx/env_class.html">DbEnv</a> 58<br><b>See Also</b> 59<a href="/api_cxx/rep_list.html">Replication and Related Methods</a> 60</tt> 61<table width="100%"><tr><td><br></td><td align=right> 62<a href="/api_cxx/api_core.html"><img src="/images/api.gif" alt="API"></a><a href="/ref/toc.html"><img src="/images/ref.gif" alt="Ref"></a> 63</td></tr></table> 64<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 65</body> 66</html> 67