Chapter 10. Replication Methods
Prev |  | Next

## Chapter 10. 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.

## Replication and Related Methods

Replication Manager Methods | Description
--- | ---
DB_ENV->repmgr_add_remote_site() | Specify the Replication Manager's remote sites
DB_ENV->repmgr_set_ack_policy(), DB_ENV->repmgr_get_ack_policy() | Specify the Replication Manager's client acknowledgement policy
DB_ENV->repmgr_set_local_site() | Specify the Replication Manager's local site
DB_ENV->repmgr_site_list() | List the sites and their status
DB_ENV->repmgr_start() | Start the Replication Manager
DB_ENV->repmgr_stat() | Replication Manager statistics
DB_ENV->repmgr_stat_print() | Print Replication Manager statistics
Base API Methods
DB_ENV->rep_elect() | Hold a replication election
DB_ENV->rep_process_message() | Process a replication message
DB_ENV->rep_set_transport() | Configure replication transport callback
DB_ENV->rep_start() | Start replication
Additional Replication Methods
DB_ENV->rep_stat() | Replication statistics
DB_ENV->rep_stat_print() | Print replication statistics
DB_ENV->rep_sync() | Replication synchronization
DB_ENV->txn_applied() | Check if a transaction has been replicated
Replication Configuration
DB_ENV->rep_set_clockskew(), DB_ENV->rep_get_clockskew() | Configure master lease clock adjustment
DB_ENV->rep_set_config(), DB_ENV->rep_get_config() | Configure the replication subsystem
DB_ENV->rep_set_limit(), DB_ENV->rep_get_limit() | Limit data sent in response to a single message
DB_ENV->rep_set_nsites(), DB_ENV->rep_get_nsites() | Configure replication group site count
DB_ENV->rep_set_priority(), DB_ENV->rep_get_priority() | Configure replication site priority
DB_ENV->rep_set_request(), DB_ENV->rep_get_request() | Configure replication client retransmission requests
DB_ENV->rep_set_timeout(), DB_ENV->rep_get_timeout() | Configure replication timeouts
Transaction Operations
DB_TXN->set_commit_token() | Set a commit token

Prev |  | Next
DB_ENV->mutex_unlock() | Home | DB_ENV->rep_elect()