<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Managing Blocking Operations</title> <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> <link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" /> <link rel="up" href="addfeatures.html" title="Chapter 5. Additional Features" /> <link rel="prev" href="addfeatures.html" title="Chapter 5. Additional Features" /> <link rel="next" href="autoinit.html" title="Stop Auto-Initialization" /> </head> <body> <div xmlns="" class="navheader"> <div class="libver"> <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">Managing Blocking Operations</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a> </td> <th width="60%" align="center">Chapter 5. Additional Features</th> <td width="20%" align="right"> <a accesskey="n" href="autoinit.html">Next</a></td> </tr> </table> <hr /> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="manageblock"></a>Managing Blocking Operations</h2> </div> </div> </div> <p> When a replica is in the process of synchronizing with its master, DB operations are blocked at some points during this process until the synchronization is completed. For replicas with a heavy read load, these blocked operations may represent an unacceptable loss in throughput. </p> <p> You can configure DB so that it will not block when synchronization is in process. Instead, the DB operation will fail, <span> immediately throwing a <code class="classname">com.sleepycat.db.ReplicationLockoutException</code> exception. </span> When this happens, it is up to your application to determine what action to take (that is, logging the event, making an appropriate user response, retrying the operation, and so forth). </p> <p> To turn off blocking on synchronization, specify <span> <code class="literal">ReplicationConfig.NOWAIT</code> and <code class="literal">true</code> to <code class="methodname">Environment.setReplicationConfig()</code>. To turn off this feature, specify <code class="literal">false</code> for the <code class="literal">ReplicationConfig.NOWAIT</code> field. </span> </p> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="addfeatures.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="autoinit.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">Chapter 5. Additional Features </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> Stop Auto-Initialization</td> </tr> </table> </div> </body> </html>