Import BSDDB 4.7.25 (as of svn r89086)
This commit is contained in:
89
docs/api_cxx/repmgr_start.html
Normal file
89
docs/api_cxx/repmgr_start.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<!--$Id: repmgr_start.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: DbEnv::repmgr_start</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>DbEnv::repmgr_start</b>
|
||||
</td>
|
||||
<td align=right>
|
||||
<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></td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>
|
||||
#include <db_cxx.h>
|
||||
<p>
|
||||
int
|
||||
DbEnv::repmgr_start(int nthreads, u_int32_t flags);
|
||||
</pre></b>
|
||||
<hr size=1 noshade>
|
||||
<b>Description: DbEnv::repmgr_start</b>
|
||||
<p>The DbEnv::repmgr_start method starts the replication manager.</p>
|
||||
<p>There are two ways to build Berkeley DB replication applications: the most
|
||||
common approach is to use the Berkeley DB library "replication manager"
|
||||
support, where the Berkeley DB library manages the replication group,
|
||||
including network transport, all replication message processing and
|
||||
acknowledgment, and group elections. Applications using the replication
|
||||
manager support generally make the following calls:</p>
|
||||
<ol>
|
||||
<p><li>Call <a href="../api_cxx/repmgr_local_site.html">DbEnv::repmgr_set_local_site</a> to configure the local site in the
|
||||
replication group.
|
||||
<p><li>Call <a href="../api_cxx/repmgr_remote_site.html">DbEnv::repmgr_add_remote_site</a> to configure the remote site(s) in
|
||||
the replication group.
|
||||
<p><li>Call <a href="../api_cxx/repmgr_ack_policy.html">DbEnv::repmgr_set_ack_policy</a> to configure the message
|
||||
acknowledgment policy which provides the replication group's
|
||||
transactional needs.
|
||||
<p><li>Call <a href="../api_cxx/rep_priority.html">DbEnv::rep_set_priority</a> to configure the local site's election
|
||||
priority.
|
||||
<p><li>Call DbEnv::repmgr_start to start the replication application.
|
||||
</ol>
|
||||
<p>For more information on building replication manager applications,
|
||||
please see the "Replication Manager Getting Started Guide" included in
|
||||
the Berkeley DB documentation.</p>
|
||||
<p>Applications with special needs (for example, applications using network
|
||||
protocols not supported by the Berkeley DB replication manager), must perform
|
||||
additional configuration and call other Berkeley DB replication methods. For
|
||||
more information on building advanced replication applications, please
|
||||
see the "Advanced Replication Applications Guide" included in the Berkeley DB
|
||||
documentation.</p>
|
||||
<p>The DbEnv::repmgr_start method may not be called before the <a href="../api_cxx/env_open.html">DbEnv::open</a> method is called.</p>
|
||||
<p>The DbEnv::repmgr_start method
|
||||
either returns a non-zero error value
|
||||
or throws an exception that encapsulates a non-zero error value on
|
||||
failure, and returns 0 on success.
|
||||
</p>
|
||||
<b>Parameters</b> <br>
|
||||
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to one of the following values:
|
||||
<br>
|
||||
<b><a name="DB_REP_MASTER">DB_REP_MASTER</a></b><ul compact><li>Start as a master site, and do not call for an election. Note there
|
||||
must never be more than a single master in any replication group, and
|
||||
only one site at a time should ever be started with the
|
||||
DB_REP_MASTER flag specified.</ul>
|
||||
<b><a name="DB_REP_CLIENT">DB_REP_CLIENT</a></b><ul compact><li>Start as a client site, and do not call for an election.</ul>
|
||||
<b><a name="DB_REP_ELECTION">DB_REP_ELECTION</a></b><ul compact><li>Start as a client, and call for an election if no master is found.</ul>
|
||||
<br></ul>
|
||||
<b>nthreads</b><ul compact><li>Specify the number of threads of control created and dedicated to processing
|
||||
replication messages. In addition to these message processing threads,
|
||||
the replication manager creates and manages a few of its own threads of
|
||||
control.</ul>
|
||||
<br>
|
||||
<hr size=1 noshade>
|
||||
<br><b>Class</b>
|
||||
<a href="../api_cxx/env_class.html">DbEnv</a>
|
||||
<br><b>See Also</b>
|
||||
<a href="../api_cxx/rep_list.html">Replication and Related Methods</a>
|
||||
</tt>
|
||||
<table width="100%"><tr><td><br></td><td align=right>
|
||||
<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>
|
||||
</td></tr></table>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user