DbEnv::repmgr_start |
#include <db_cxx.h>int DbEnv::repmgr_start(int nthreads, u_int32_t flags);
The DbEnv::repmgr_start method starts the replication manager.
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:
For more information on building replication manager applications, please see the "Replication Manager Getting Started Guide" included in the Berkeley DB documentation.
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.
The DbEnv::repmgr_start method may not be called before the DbEnv::open method has been called.
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.
The DB_REP_FULL_ELECTION flag configures a single special election on startup, where a master will only be confirmed if all members of the replication group vote. Subsequent elections will revert to only requiring a simple majority to elect a new master.
Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.