Getting Started with Replicated Berkeley DB Applications

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technetwork/database/berkeleydb/downloads/oslicense-093458.html

Oracle, Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

Java™ and all Java-based marks are a trademark or registered trademark of Sun Microsystems, Inc, in the United States and other countries.

Other names may be trademarks of their respective owners.

To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: http://forums.oracle.com/forums/forum.jspa?forumID=271

5/11/2012


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Overview
Replication Environments
Replication Databases
Communications Layer
Selecting a Master
Replication Benefits
The Replication APIs
Replication Manager Overview
Replication Base API Overview
Holding Elections
Influencing Elections
Winning Elections
Switching Masters
Permanent Message Handling
When Not to Manage Permanent Messages
Managing Permanent Messages
Implementing Permanent Message Handling
2. Transactional Application
Application Overview
Program Listing
Class: RepConfig
Class: SimpleTxn
Method: SimpleTxn.main()
Method: SimpleTxn.init()
Method: SimpleTxn.doloop()
Method: SimpleTxn.printStocks()
3. The DB Replication Manager
Starting and Stopping Replication
Managing Election Policies
Selecting the Number of Threads
Adding the Replication Manager to SimpleTxn
Permanent Message Handling
Identifying Permanent Message Policies
Setting the Permanent Message Timeout
Adding a Permanent Message Policy to RepQuoteExampleGSG
Managing Election Times
Managing Election Timeouts
Managing Election Retry Times
Managing Connection Retries
Managing Heartbeats
4. Replica versus Master Processes
Determining State
Processing Loop
Example Processing Loop
Running It
5. Additional Features
Delayed Synchronization
Managing Blocking Operations
Stop Auto-Initialization
Read-Your-Writes Consistency
Client to Client Transfer
Identifying Peers
Bulk Transfers