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> 7LogCursor (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="LogCursor (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/LogCursor.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/LockStats.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A> 59 <A HREF="../../../com/sleepycat/db/LogRecordHandler.html" title="interface 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/LogCursor.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="LogCursor.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81DETAIL: FIELD | 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> 93Class LogCursor</H2> 94<PRE> 95<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> 96 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.db.LogCursor</B> 97</PRE> 98<HR> 99<DL> 100<DT><PRE>public class <B>LogCursor</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> 101</PRE> 102 103<P> 104The LogCursor object is the handle for a cursor into the log files, 105supporting sequential access to the records stored in log files. 106<p> 107The handle is not free-threaded. Once the <A HREF="../../../com/sleepycat/db/LogCursor.html#close()"><CODE>LogCursor.close</CODE></A> 108method is called, the handle may not be accessed again, regardless of 109that method's success or failure. 110<P> 111 112<P> 113<HR> 114 115<P> 116 117<!-- ========== METHOD SUMMARY =========== --> 118 119<A NAME="method_summary"><!-- --></A> 120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 122<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 123<B>Method Summary</B></FONT></TH> 124</TR> 125<TR BGCOLOR="white" CLASS="TableRowColor"> 126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 127<CODE> void</CODE></FONT></TD> 128<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#close()">close</A></B>()</CODE> 129 130<BR> 131 </TD> 132</TR> 133<TR BGCOLOR="white" CLASS="TableRowColor"> 134<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 135<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD> 136<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#getCurrent(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)">getCurrent</A></B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 137 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE> 138 139<BR> 140 Return the LogSequenceNumber and log record to which the log cursor 141 currently refers.</TD> 142</TR> 143<TR BGCOLOR="white" CLASS="TableRowColor"> 144<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 145<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD> 146<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#getFirst(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)">getFirst</A></B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 147 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE> 148 149<BR> 150 Return the first LogSequenceNumber and log record.</TD> 151</TR> 152<TR BGCOLOR="white" CLASS="TableRowColor"> 153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 154<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD> 155<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#getLast(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)">getLast</A></B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 156 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE> 157 158<BR> 159 Return the last LogSequenceNumber and log record.</TD> 160</TR> 161<TR BGCOLOR="white" CLASS="TableRowColor"> 162<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 163<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD> 164<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#getNext(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)">getNext</A></B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 165 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE> 166 167<BR> 168 Return the next LogSequenceNumber and log record.</TD> 169</TR> 170<TR BGCOLOR="white" CLASS="TableRowColor"> 171<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 172<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD> 173<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#getPrev(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)">getPrev</A></B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 174 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE> 175 176<BR> 177 Return the previous LogSequenceNumber and log record.</TD> 178</TR> 179<TR BGCOLOR="white" CLASS="TableRowColor"> 180<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 181<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD> 182<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#set(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)">set</A></B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 183 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE> 184 185<BR> 186 Return a specific log record.</TD> 187</TR> 188<TR BGCOLOR="white" CLASS="TableRowColor"> 189<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 190<CODE> int</CODE></FONT></TD> 191<TD><CODE><B><A HREF="../../../com/sleepycat/db/LogCursor.html#version()">version</A></B>()</CODE> 192 193<BR> 194 Get the log file version.</TD> 195</TR> 196</TABLE> 197 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 198<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 199<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 200<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> 201</TR> 202<TR BGCOLOR="white" CLASS="TableRowColor"> 203<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> 204</TR> 205</TABLE> 206 207<P> 208 209<!-- ============ METHOD DETAIL ========== --> 210 211<A NAME="method_detail"><!-- --></A> 212<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 213<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 214<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 215<B>Method Detail</B></FONT></TH> 216</TR> 217</TABLE> 218 219<A NAME="close()"><!-- --></A><H3> 220close</H3> 221<PRE> 222public void <B>close</B>() 223 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 224<DL> 225<DD><DL> 226 227<DT><B>Throws:</B> 228<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL> 229</DD> 230</DL> 231<HR> 232 233<A NAME="getCurrent(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3> 234getCurrent</H3> 235<PRE> 236public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getCurrent</B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 237 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data) 238 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 239<DL> 240<DD>Return the LogSequenceNumber and log record to which the log cursor 241 currently refers. 242 <p> 243<P> 244<DD><DL> 245<DT><B>Parameters:</B><DD><CODE>lsn</CODE> - The returned LogSequenceNumber. 246 <p><DD><CODE>data</CODE> - The returned log record. The data field is set to the record 247 retrieved, and the size field indicates the number of bytes in 248 the record. 249 <p> 250<DT><B>Returns:</B><DD>The status of the operation. 251 <p> 252 <p> 253<DT><B>Throws:</B> 254<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 255</DD> 256</DL> 257<HR> 258 259<A NAME="getNext(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3> 260getNext</H3> 261<PRE> 262public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getNext</B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 263 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data) 264 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 265<DL> 266<DD>Return the next LogSequenceNumber and log record. 267 <p> 268 The current log position is advanced to the next record in the log, 269 and its LogSequenceNumber and data are returned. If the cursor has 270 not been initialized, the first available log record in the log will 271 be returned. 272 <p> 273<P> 274<DD><DL> 275<DT><B>Parameters:</B><DD><CODE>lsn</CODE> - The returned LogSequenceNumber. 276 <p><DD><CODE>data</CODE> - The returned log record. 277 <p> 278<DT><B>Returns:</B><DD>The status of the operation; a return of NOTFOUND indicates the last 279 log record has already been returned or the log is empty. 280 <p> 281 <p> 282<DT><B>Throws:</B> 283<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 284</DD> 285</DL> 286<HR> 287 288<A NAME="getFirst(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3> 289getFirst</H3> 290<PRE> 291public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getFirst</B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 292 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data) 293 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 294<DL> 295<DD>Return the first LogSequenceNumber and log record. 296 <p> 297 The current log position is set to the first record in the log, 298 and its LogSequenceNumber and data are returned. 299 <p> 300<P> 301<DD><DL> 302<DT><B>Parameters:</B><DD><CODE>lsn</CODE> - The returned LogSequenceNumber. 303 <p><DD><CODE>data</CODE> - The returned log record. 304 <p> 305<DT><B>Returns:</B><DD>The status of the operation; a return of NOTFOUND indicates the log 306 is empty. 307 <p> 308 <p> 309<DT><B>Throws:</B> 310<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 311</DD> 312</DL> 313<HR> 314 315<A NAME="getLast(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3> 316getLast</H3> 317<PRE> 318public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getLast</B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 319 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data) 320 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 321<DL> 322<DD>Return the last LogSequenceNumber and log record. 323 <p> 324 The current log position is set to the last record in the log, 325 and its LogSequenceNumber and data are returned. 326 <p> 327<P> 328<DD><DL> 329<DT><B>Parameters:</B><DD><CODE>lsn</CODE> - The returned LogSequenceNumber. 330 <p><DD><CODE>data</CODE> - The returned log record. 331 <p> 332<DT><B>Returns:</B><DD>The status of the operation; a return of NOTFOUND indicates the log 333 is empty. 334 <p> 335 <p> 336<DT><B>Throws:</B> 337<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 338</DD> 339</DL> 340<HR> 341 342<A NAME="getPrev(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3> 343getPrev</H3> 344<PRE> 345public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getPrev</B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 346 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data) 347 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 348<DL> 349<DD>Return the previous LogSequenceNumber and log record. 350 <p> 351 The current log position is advanced to the previous record in the log, 352 and its LogSequenceNumber and data are returned. If the cursor has 353 not been initialized, the last available log record in the log will 354 be returned. 355 <p> 356<P> 357<DD><DL> 358<DT><B>Parameters:</B><DD><CODE>lsn</CODE> - The returned LogSequenceNumber. 359 <p><DD><CODE>data</CODE> - The returned log record. 360 <p> 361<DT><B>Returns:</B><DD>The status of the operation; a return of NOTFOUND indicates the first 362 log record has already been returned or the log is empty. 363 <p> 364 <p> 365<DT><B>Throws:</B> 366<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 367</DD> 368</DL> 369<HR> 370 371<A NAME="set(com.sleepycat.db.LogSequenceNumber, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3> 372set</H3> 373<PRE> 374public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>set</B>(<A HREF="../../../com/sleepycat/db/LogSequenceNumber.html" title="class in com.sleepycat.db">LogSequenceNumber</A> lsn, 375 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data) 376 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 377<DL> 378<DD>Return a specific log record. 379 <p> 380 The current log position is set to the specified record in the log, 381 and its data is returned. 382 <p> 383<P> 384<DD><DL> 385<DT><B>Parameters:</B><DD><CODE>lsn</CODE> - The specified LogSequenceNumber. 386 <p><DD><CODE>data</CODE> - The returned log record. 387 <p> 388<DT><B>Returns:</B><DD>The status of the operation. 389 <p> 390 <p> 391<DT><B>Throws:</B> 392<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 393</DD> 394</DL> 395<HR> 396 397<A NAME="version()"><!-- --></A><H3> 398version</H3> 399<PRE> 400public int <B>version</B>() 401 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE> 402<DL> 403<DD>Get the log file version. 404 <p> 405<P> 406<DD><DL> 407 408<DT><B>Returns:</B><DD>The log file version. 409 <p> 410 <p> 411<DT><B>Throws:</B> 412<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL> 413</DD> 414</DL> 415<!-- ========= END OF CLASS DATA ========= --> 416<HR> 417 418 419<!-- ======= START OF BOTTOM NAVBAR ====== --> 420<A NAME="navbar_bottom"><!-- --></A> 421<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 422<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 423<TR> 424<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 425<A NAME="navbar_bottom_firstrow"><!-- --></A> 426<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 427 <TR ALIGN="center" VALIGN="top"> 428 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 429 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 430 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 431 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/LogCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 432 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 433 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 434 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 435 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 436 </TR> 437</TABLE> 438</TD> 439<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 440<b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> 441</TD> 442</TR> 443 444<TR> 445<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 446 <A HREF="../../../com/sleepycat/db/LockStats.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A> 447 <A HREF="../../../com/sleepycat/db/LogRecordHandler.html" title="interface in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD> 448<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 449 <A HREF="../../../index.html?com/sleepycat/db/LogCursor.html" target="_top"><B>FRAMES</B></A> 450 <A HREF="LogCursor.html" target="_top"><B>NO FRAMES</B></A> 451 <SCRIPT type="text/javascript"> 452 <!-- 453 if(window==top) { 454 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); 455 } 456 //--> 457</SCRIPT> 458<NOSCRIPT> 459 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> 460</NOSCRIPT> 461 462 463</FONT></TD> 464</TR> 465<TR> 466<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 467 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 468<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 469DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 470</TR> 471</TABLE> 472<A NAME="skip-navbar_bottom"></A> 473<!-- ======== END OF BOTTOM NAVBAR ======= --> 474 475<HR> 476<font size=1>Copyright (c) 1996-2009 Oracle. All rights reserved.</font> 477</BODY> 478</HTML> 479