Library Version 18.1.40

Chapter 11. Replication Methods
Prev |  | Next

## Chapter 11. Replication Methods

This chapter describes the APIs available to build Berkeley DB replicated applications. There are two different ways to build replication into a Berkeley DB application, and the APIs for both are described in this chapter.

For an overview of the two different ways to build a replicated application, see the Berkeley DB Getting Started with Replicated Applications guide.

The first, and simplest, way to build a replication Berkeley DB application is via the Replication Manager. If the Replication Manager does not meet your application's architectural requirements, you can write your own replication implementation using the "Base APIs".

Note that the Replication Manager is written using the Base APIs.

Note, also, that applications which make use of the Replication Manager use many of the Base APIs as the situation warrants. That said, a few Base API methods cannot be used by applications that are making use of the Replication Manager. Where this is the case, this is noted in the following method descriptions.

Finally, Replication Manager applications use the DbSite class to manage and configure replication sites. The DbChannel class can be used to transmit custom messages between sites in the replication group. These classes are not used in any way by Base API applications.

## Replication and Related Methods

Replication Manager Methods | Description
--- | ---
DbChannel::close() | Closes a DB_CHANNEL handle
DbChannel::send_msg() | Sends an asynchronous message on a DB_CHANNEL
DbChannel::send_request() | Sends a synchronous message on a DB_CHANNEL
DbEnv::repmgr_channel() | Creates a DB_CHANNEL handle
DbEnv::repmgr_local_site() | Returns a DB_SITE handle for the local site
DbEnv::repmgr_msg_dispatch() | Configures a DB_CHANNEL's message dispatch function
DbEnv::repmgr_set_ack_policy() , DbEnv::repmgr_get_ack_policy() | Specify the Replication Manager's client acknowledgement policy
DbEnv::repmgr_set_incoming_queue_max() , DbEnv::repmgr_get_incoming_queue_max() | Configure the Replication Manager incoming queue size limit.
DbEnv::repmgr_set_socket() | Configure the Replication Manager's socket callback
DbEnv::repmgr_site() | Creates a DB_SITE handle
DbEnv::repmgr_site_by_eid() | Creates a DB_SITE handle given an EID value
DbEnv::repmgr_site_list() | List the sites and their status
DbEnv::repmgr_set_ssl_config() | Configures the SSL Support for the Replication Manager
DbEnv::repmgr_start() | Start the Replication Manager
DbEnv::repmgr_stat() | Replication Manager statistics
DbEnv::repmgr_stat_print() | Print Replication Manager statistics
DbSite::close() | Closes the DB_SITE handle
Base API Methods
DbEnv::rep_elect() | Hold a replication election
DbEnv::rep_process_message() | Process a replication message
DbEnv::rep_set_transport() | Configure replication transport callback
DbEnv::rep_start() | Start replication
Additional Replication Methods
DbEnv::rep_stat() | Replication statistics
DbEnv::rep_stat_print() | Print replication statistics
DbEnv::rep_sync() | Replication synchronization
Replication Configuration
DbChannel::set_timeout() | Sets the default timeout for a DB_CHANNEL
DbSite::get_address() | Returns a site's network address
DbSite::get_eid() | Returns a site's environment ID
DbSite::remove() | Removes the site from the replication group
DbSite::set_config() , DbSite::get_config() | Configure a DB_SITE handle
DbEnv::rep_set_clockskew() , DbEnv::rep_get_clockskew() | Configure master lease clock adjustment
DbEnv::rep_set_config() , DbEnv::rep_get_config() | Configure the replication subsystem
DbEnv::rep_set_limit() , DbEnv::rep_get_limit() | Limit data sent in response to a single message
DbEnv::rep_set_nsites() , DbEnv::rep_get_nsites() | Configure replication group site count
DbEnv::rep_set_priority() , DbEnv::rep_get_priority() | Configure replication site priority
DbEnv::rep_set_request() , DbEnv::rep_get_request() | Configure replication client retransmission requests
DbEnv::rep_set_timeout() , DbEnv::rep_get_timeout() | Configure replication timeouts
DbEnv::rep_set_view() | Configure the replication view callback
Transaction Operations
DbEnv::txn_applied() | Check if a transaction has been replicated
DbTxn::set_commit_token() | Set a commit token

Prev |  | Next
DbEnv::mutex_unlock() | Home | The DbSite Handle