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/technology/software/products/berkeley-db/htdocs/oslicensing.html

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

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

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

9/20/2006


Table of Contents

Preface
Conventions Used in this Book
For More Information
1. Introduction
Overview
Replication Environments
Replication Databases
Communications Layer
Selecting a Master
Replication Benefits
The Replication APIs
Replication Framework Overview
Replication 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 Framework
Starting and Stopping Replication
Managing Election Policies
Selecting the Number of Threads
Adding the Replication Framework to
Permanent Message Handling
Identifying Permanent Message Policies
Setting the Permanent Message Timeout
Adding a Permanent Message Policy to RepQuoteExample
Managing Election Times
Managing Election Timeouts
Managing Election Retry Times
Managing Connection Retries
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
Client to Client Transfer
Identifying Peers
Bulk Transfers