1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!--NewPage--> 3<HTML> 4<HEAD> 5<!-- Generated by javadoc (build 1.6.0_03) on Mon Apr 12 16:25:47 EDT 2010 --> 6<TITLE> 7ReplicationTransport (Oracle - Berkeley DB Java API) 8</TITLE> 9 10<META NAME="date" CONTENT="2010-04-12"> 11 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style"> 13 14<SCRIPT type="text/javascript"> 15function windowTitle() 16{ 17 if (location.href.indexOf('is-external=true') == -1) { 18 parent.document.title="ReplicationTransport (Oracle - Berkeley DB Java API)"; 19 } 20} 21</SCRIPT> 22<NOSCRIPT> 23</NOSCRIPT> 24 25</HEAD> 26 27<BODY BGCOLOR="white" onload="windowTitle();"> 28<HR> 29 30 31<!-- ========= START OF TOP NAVBAR ======= --> 32<A NAME="navbar_top"><!-- --></A> 33<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 35<TR> 36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 37<A NAME="navbar_top_firstrow"><!-- --></A> 38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 39 <TR ALIGN="center" VALIGN="top"> 40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ReplicationTransport.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49</TABLE> 50</TD> 51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 52<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> 53</TD> 54</TR> 55 56<TR> 57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 <A HREF="../../../com/sleepycat/db/ReplicationTimeoutType.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A> 59 <A HREF="../../../com/sleepycat/db/RunRecoveryException.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD> 60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../index.html?com/sleepycat/db/ReplicationTransport.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ReplicationTransport.html" target="_top"><B>NO FRAMES</B></A> 63 <SCRIPT type="text/javascript"> 64 <!-- 65 if(window==top) { 66 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 67 } 68 //--> 69</SCRIPT> 70<NOSCRIPT> 71 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 72</NOSCRIPT> 73 74 75</FONT></TD> 76</TR> 77<TR> 78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 79 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 82</TR> 83</TABLE> 84<A NAME="skip-navbar_top"></A> 85<!-- ========= END OF TOP NAVBAR ========= --> 86 87<HR> 88<!-- ======== START OF CLASS DATA ======== --> 89<H2> 90<FONT SIZE="-1"> 91com.sleepycat.db</FONT> 92<BR> 93Interface ReplicationTransport</H2> 94<HR> 95<DL> 96<DT><PRE>public interface <B>ReplicationTransport</B></DL> 97</PRE> 98 99<P> 100An interface specifying a replication transmit function, which sends 101information to other members of the replication group. 102<P> 103 104<P> 105<HR> 106 107<P> 108<!-- =========== FIELD SUMMARY =========== --> 109 110<A NAME="field_summary"><!-- --></A> 111<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 112<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 113<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 114<B>Field Summary</B></FONT></TH> 115</TR> 116<TR BGCOLOR="white" CLASS="TableRowColor"> 117<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 118<CODE>static int</CODE></FONT></TD> 119<TD><CODE><B><A HREF="../../../com/sleepycat/db/ReplicationTransport.html#EID_BROADCAST">EID_BROADCAST</A></B></CODE> 120 121<BR> 122 A message that should be broadcast to every environment in the 123 replication group.</TD> 124</TR> 125<TR BGCOLOR="white" CLASS="TableRowColor"> 126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 127<CODE>static int</CODE></FONT></TD> 128<TD><CODE><B><A HREF="../../../com/sleepycat/db/ReplicationTransport.html#EID_INVALID">EID_INVALID</A></B></CODE> 129 130<BR> 131 An invalid environment ID, and may be used to initialize environment ID 132 variables that are subsequently checked for validity.</TD> 133</TR> 134</TABLE> 135 136<!-- ========== METHOD SUMMARY =========== --> 137 138<A NAME="method_summary"><!-- --></A> 139<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 140<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 141<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 142<B>Method Summary</B></FONT></TH> 143</TR> 144<TR BGCOLOR="white" CLASS="TableRowColor"> 145<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 146<CODE> int</CODE></FONT></TD> 147<TD><CODE><B><A HREF="../../../com/sleepycat/db/ReplicationTransport.html#send(com.sleepycat.db.Environment, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LogSequenceNumber, int, boolean, boolean, boolean, boolean)">send</A></B>(<A HREF="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A> environment, 148 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> control, 149 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> rec, 150 <A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 151 int envid, 152 boolean noBuffer, 153 boolean permanent, 154 boolean anywhere, 155 boolean isRetry)</CODE> 156 157<BR> 158 The callback used when Berkeley DB needs to transmit a replication message.</TD> 159</TR> 160</TABLE> 161 162<P> 163 164<!-- ============ FIELD DETAIL =========== --> 165 166<A NAME="field_detail"><!-- --></A> 167<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 168<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 169<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 170<B>Field Detail</B></FONT></TH> 171</TR> 172</TABLE> 173 174<A NAME="EID_BROADCAST"><!-- --></A><H3> 175EID_BROADCAST</H3> 176<PRE> 177static final int <B>EID_BROADCAST</B></PRE> 178<DL> 179<DD>A message that should be broadcast to every environment in the 180 replication group. The application may use a true broadcast protocol or 181 may send the message in sequence to each machine with which it is in 182 communication. In both cases, the sending site should not be asked to 183 process the message. 184<P> 185<DL> 186<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.db.ReplicationTransport.EID_BROADCAST">Constant Field Values</A></DL> 187</DL> 188<HR> 189 190<A NAME="EID_INVALID"><!-- --></A><H3> 191EID_INVALID</H3> 192<PRE> 193static final int <B>EID_INVALID</B></PRE> 194<DL> 195<DD>An invalid environment ID, and may be used to initialize environment ID 196 variables that are subsequently checked for validity. 197<P> 198<DL> 199<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.db.ReplicationTransport.EID_INVALID">Constant Field Values</A></DL> 200</DL> 201 202<!-- ============ METHOD DETAIL ========== --> 203 204<A NAME="method_detail"><!-- --></A> 205<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 206<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 207<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 208<B>Method Detail</B></FONT></TH> 209</TR> 210</TABLE> 211 212<A NAME="send(com.sleepycat.db.Environment, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LogSequenceNumber, int, boolean, boolean, boolean, boolean)"><!-- --></A><H3> 213send</H3> 214<PRE> 215int <B>send</B>(<A HREF="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A> environment, 216 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> control, 217 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> rec, 218 <A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 219 int envid, 220 boolean noBuffer, 221 boolean permanent, 222 boolean anywhere, 223 boolean isRetry) 224 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 225<DL> 226<DD>The callback used when Berkeley DB needs to transmit a replication message. 227 This method must not call back down into Berkeley DB. It must return 0 on 228 success and non-zero on failure. If the transmission fails, the message 229 being sent is necessary to maintain database integrity, and the local log 230 is not configured for synchronous flushing, the local log will be flushed; 231 otherwise, any error from the function will be ignored. 232 <p> 233<P> 234<DD><DL> 235<DT><B>Parameters:</B><DD><CODE>environment</CODE> - The enclosing database environment handle. 236 <p><DD><CODE>control</CODE> - The first of the two data elements to be transmitted. 237 <p><DD><CODE>rec</CODE> - The second of the two data elements to be transmitted. 238 <p><DD><CODE>lsn</CODE> - If the type of message to be sent has an LSN associated with it, 239 then the lsn contains the LSN of the record being sent. This LSN 240 can be used to determine that certain records have been processed 241 successfully by clients. 242 <p><DD><CODE>envid</CODE> - A positive integer identifier that specifies the replication 243 environment to which the message should be sent. 244 <p> 245 The value DB_EID_BROADCAST indicates that a message should be 246 broadcast to every environment in the replication group. The 247 application may use a true broadcast protocol or may send the 248 message in sequence to each machine with which it is in 249 communication. In both cases, the sending site should not be asked 250 to process the message. 251 <p><DD><CODE>noBuffer</CODE> - The record being sent should be transmitted immediately and not buffered 252 or delayed. 253 <p><DD><CODE>permanent</CODE> - The record being sent is critical for maintaining database integrity 254 (for example, the message includes a transaction commit). The 255 application should take appropriate action to enforce the reliability 256 guarantees it has chosen, such as waiting for acknowledgement from one 257 or more clients. 258 <p><DD><CODE>anywhere</CODE> - The message is a client request that can be satisfied by another client as 259 well as by the master. 260 <p><DD><CODE>isRetry</CODE> - The message is a client request that has already been made and to which no 261 response was received. 262 <p> 263<DT><B>Throws:</B> 264<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 265</DD> 266</DL> 267<!-- ========= END OF CLASS DATA ========= --> 268<HR> 269 270 271<!-- ======= START OF BOTTOM NAVBAR ====== --> 272<A NAME="navbar_bottom"><!-- --></A> 273<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 274<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 275<TR> 276<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 277<A NAME="navbar_bottom_firstrow"><!-- --></A> 278<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 279 <TR ALIGN="center" VALIGN="top"> 280 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 281 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 282 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 283 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ReplicationTransport.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 284 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 285 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 286 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 287 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 288 </TR> 289</TABLE> 290</TD> 291<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 292<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> 293</TD> 294</TR> 295 296<TR> 297<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 298 <A HREF="../../../com/sleepycat/db/ReplicationTimeoutType.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A> 299 <A HREF="../../../com/sleepycat/db/RunRecoveryException.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD> 300<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 301 <A HREF="../../../index.html?com/sleepycat/db/ReplicationTransport.html" target="_top"><B>FRAMES</B></A> 302 <A HREF="ReplicationTransport.html" target="_top"><B>NO FRAMES</B></A> 303 <SCRIPT type="text/javascript"> 304 <!-- 305 if(window==top) { 306 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 307 } 308 //--> 309</SCRIPT> 310<NOSCRIPT> 311 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 312</NOSCRIPT> 313 314 315</FONT></TD> 316</TR> 317<TR> 318<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 319 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 320<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 321DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 322</TR> 323</TABLE> 324<A NAME="skip-navbar_bottom"></A> 325<!-- ======== END OF BOTTOM NAVBAR ======= --> 326 327<HR> 328<font size=1>Copyright (c) 1996-2009 Oracle. All rights reserved.</font> 329</BODY> 330</HTML> 331