1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>Managing Blocking Operations</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" /> 9 <link rel="home" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" /> 10 <link rel="up" href="addfeatures.html" title="Chapter 5. Additional Features" /> 11 <link rel="previous" href="addfeatures.html" title="Chapter 5. Additional Features" /> 12 <link rel="next" href="noautoinit.html" title="Stop Auto-Initialization" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Managing Blocking Operations</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a> </td> 22 <th width="60%" align="center">Chapter 5. Additional Features</th> 23 <td width="20%" align="right"> <a accesskey="n" href="noautoinit.html">Next</a></td> 24 </tr> 25 </table> 26 <hr /> 27 </div> 28 <div class="sect1" lang="en" xml:lang="en"> 29 <div class="titlepage"> 30 <div> 31 <div> 32 <h2 class="title" style="clear: both"><a id="manageblock"></a>Managing Blocking Operations</h2> 33 </div> 34 </div> 35 <div></div> 36 </div> 37 <p> 38 When a replica is in the process of synchronizing with its master, all DB 39 operations are blocked until such a time as the synchronization is completed. 40 For replicas with a heavy read load, these blocked operations may represent an 41 unacceptable loss in throughput. 42 </p> 43 <p> 44 You can configure DB so that it will not block when synchronization is in 45 process. Instead, the DB operation will fail, 46 47 48 49 <span> 50 immediately throwing a 51 <tt class="classname">com.sleepycat.db.ReplicationLockoutException</tt> 52 exception. 53 </span> 54 When this happens, it is up to your application to your application to determine 55 what action to take (that is, logging the event, making an appropriate user 56 response, retrying the operation, and so forth). 57 </p> 58 <p> 59 To turn off blocking on synchronization, specify 60 61 <span> 62 <tt class="literal">ReplicationConfig.NOWAIT</tt> and 63 <tt class="literal">true</tt> to 64 <tt class="methodname">Environment.setReplicationConfig()</tt>. 65 To turn off this feature, specify 66 <tt class="literal">false</tt> for the 67 <tt class="literal">ReplicationConfig.NOWAIT</tt> field. 68 </span> 69 </p> 70 </div> 71 <div class="navfooter"> 72 <hr /> 73 <table width="100%" summary="Navigation footer"> 74 <tr> 75 <td width="40%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a> </td> 76 <td width="20%" align="center"> 77 <a accesskey="u" href="addfeatures.html">Up</a> 78 </td> 79 <td width="40%" align="right"> <a accesskey="n" href="noautoinit.html">Next</a></td> 80 </tr> 81 <tr> 82 <td width="40%" align="left" valign="top">Chapter 5. Additional Features </td> 83 <td width="20%" align="center"> 84 <a accesskey="h" href="index.html">Home</a> 85 </td> 86 <td width="40%" align="right" valign="top"> Stop Auto-Initialization</td> 87 </tr> 88 </table> 89 </div> 90 </body> 91</html> 92