<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Wed Dec 03 16:22:10 EST 2003 --> <TITLE> DbLogc (Sleepycat Software, Inc. - Berkeley DB Java API) </TITLE> <META NAME="keywords" CONTENT="com.sleepycat.db.DbLogc,DbLogc class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style"> </HEAD> <SCRIPT> function asd() { parent.document.title="DbLogc (Sleepycat Software, Inc. - Berkeley DB Java API)"; } </SCRIPT> <BODY BGCOLOR="white" onload="asd();"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DbLogc.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Berkeley DB</b><br><font size="-1"> version 4.2.52</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/db/DbLockStat.html"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/db/DbLogStat.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DbLogc.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.sleepycat.db</FONT> <BR> Class DbLogc</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">java.lang.Object</A> | +--<B>com.sleepycat.db.DbLogc</B> </PRE> <HR> <DL> <DT>public class <B>DbLogc</B><DT>extends <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></DL> <P> The DbLogc object is the handle for a cursor into the log files, supporting sequential access to the records stored in log files. The handle is not free-threaded. Once the <A HREF="../../../com/sleepycat/db/DbLogc.html#close(int)"><CODE>DbLogc.close</CODE></A> method is called, the handle may not be accessed again, regardless of that method's return.</p> <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/db/DbLogc.html#close(int)">close</A></B>(int flags)</CODE> <BR> The DbLogc.close method discards the log cursor.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/db/DbLogc.html#get(com.sleepycat.db.DbLsn, com.sleepycat.db.Dbt, int)">get</A></B>(<A HREF="../../../com/sleepycat/db/DbLsn.html">DbLsn</A> lsn, <A HREF="../../../com/sleepycat/db/Dbt.html">Dbt</A> data, int flags)</CODE> <BR> The DbLogc.get method returns records from the log.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="close(int)"><!-- --></A><H3> close</H3> <PRE> public void <B>close</B>(int flags) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></PRE> <DL> <DD>The DbLogc.close method discards the log cursor. After DbLogc.close has been called, regardless of its return, the cursor handle may not be used again.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>flags</CODE> - currently unused, and must be set to 0. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - The DbLogc.close method will fail and throw a IllegalArgumentException exception if the cursor was previously closed; or if an invalid flag value or parameter was specified.</DL> </DD> </DL> <HR> <A NAME="get(com.sleepycat.db.DbLsn, com.sleepycat.db.Dbt, int)"><!-- --></A><H3> get</H3> <PRE> public int <B>get</B>(<A HREF="../../../com/sleepycat/db/DbLsn.html">DbLsn</A> lsn, <A HREF="../../../com/sleepycat/db/Dbt.html">Dbt</A> data, int flags) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></PRE> <DL> <DD>The DbLogc.get method returns records from the log.</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>data</CODE> - The data field of the <b>data</b> structure is set to the record retrieved, and the size field indicates the number of bytes in the record. See <A HREF="../../../com/sleepycat/db/Dbt.html"><CODE>Dbt</CODE></A> for a description of other fields in the <b>data</b> structure. The <A HREF="../../../com/sleepycat/db/Db.html#DB_DBT_MALLOC"><CODE>Db.DB_DBT_MALLOC</CODE></A>, <A HREF="../../../com/sleepycat/db/Db.html#DB_DBT_REALLOC"><CODE>Db.DB_DBT_REALLOC</CODE></A> and <A HREF="../../../com/sleepycat/db/Db.html#DB_DBT_USERMEM"><CODE>Db.DB_DBT_USERMEM</CODE></A> flags may be specified for any <A HREF="../../../com/sleepycat/db/Dbt.html"><CODE>Dbt</CODE></A> used for data retrieval.<DD><CODE>flags</CODE> - must be set to one of the following values: <ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_CURRENT"><CODE>Db.DB_CURRENT</CODE></A><p>Return the log record to which the log currently refers. </li></ul><ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_FIRST"><CODE>Db.DB_FIRST</CODE></A><p>The first record from any of the log files found in the log directory is returned in the <b>data</b> parameter. overwritten with the <A HREF="../../../com/sleepycat/db/DbLsn.html"><CODE>DbLsn</CODE></A> of the record returned. </li></ul><ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_LAST"><CODE>Db.DB_LAST</CODE></A><p>The last record in the log is returned in the <b>data</b> parameter. overwritten with the <A HREF="../../../com/sleepycat/db/DbLsn.html"><CODE>DbLsn</CODE></A> of the record returned. </li></ul><ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_NEXT"><CODE>Db.DB_NEXT</CODE></A><p>The current log position is advanced to the next record in the log, and that record is returned in the <b>data</b> parameter. overwritten with the <A HREF="../../../com/sleepycat/db/DbLsn.html"><CODE>DbLsn</CODE></A> of the record returned. <p>If the cursor has not been initialized via DB_FIRST, DB_LAST, DB_SET, DB_NEXT, or DB_PREV, DbLogc.get will return the first record in the log.</p> </li></ul><ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_PREV"><CODE>Db.DB_PREV</CODE></A><p>The current log position is advanced to the previous record in the log, and that record is returned in the <b>data</b> parameter. overwritten with the <A HREF="../../../com/sleepycat/db/DbLsn.html"><CODE>DbLsn</CODE></A> of the record returned. <p>If the cursor has not been initialized via DB_FIRST, DB_LAST, DB_SET, DB_NEXT, or DB_PREV, DbLogc.get will return the last record in the log.</p> </li></ul><ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_SET"><CODE>Db.DB_SET</CODE></A><p>Retrieve the record specified by the <b>lsn</b> parameter. </li></ul><DD><CODE>lsn</CODE> - When the <b>flag</b> parameter is set to Db.DB_CURRENT, Db.DB_FIRST, Db.DB_LAST, Db.DB_NEXT or Db.DB_PREV, the <b>lsn</b> parameter is overwritten with the <A HREF="../../../com/sleepycat/db/DbLsn.html"><CODE>DbLsn</CODE></A> value of the record retrieved. When <b>flag</b> is set to Db.DB_SET, the <b>lsn</b> parameter is the <A HREF="../../../com/sleepycat/db/DbLsn.html"><CODE>DbLsn</CODE></A> value of the record to be retrieved. <DT><B>Returns:</B><DD>Unless otherwise specified, the DbLogc.get method throws an exception that encapsulates a non-zero error value on failure. </p> <ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_NOTFOUND"><CODE>DB_NOTFOUND</CODE></A><p>The DbLogc.get method will return <a href="../../../../ref/program/errorret.html#DB_NOTFOUND"><code>Db.DB_NOTFOUND</code></a> if <code>Db.DB_FIRST</code> is set and the log is empty. </li></ul></p> <ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_NOTFOUND"><CODE>DB_NOTFOUND</CODE></A><p>The DbLogc.get method will return <a href="../../../../ref/program/errorret.html#DB_NOTFOUND"><code>Db.DB_NOTFOUND</code></a> if <code>Db.DB_LAST</code> is set and the log is empty. </li></ul></p> <ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_NOTFOUND"><CODE>DB_NOTFOUND</CODE></A><p>The DbLogc.get method will return <a href="../../../../ref/program/errorret.html#DB_NOTFOUND"><code>Db.DB_NOTFOUND</code></a> if <code>Db.DB_NEXT</code> is set and the last log record has already been returned or the log is empty. </li></ul></p> <ul><li><A HREF="../../../com/sleepycat/db/Db.html#DB_NOTFOUND"><CODE>DB_NOTFOUND</CODE></A><p>The DbLogc.get method will return <a href="../../../../ref/program/errorret.html#DB_NOTFOUND"><code>Db.DB_NOTFOUND</code></a> if <code>Db.DB_PREV</code> is set and the first log record has already been returned or the log is empty. </li></ul></p> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - The DbLogc.get method will fail and throw a IllegalArgumentException exception if the Db.DB_CURRENT flag was set and the log cursor has not yet been initialized; the Db.DB_CURRENT, Db.DB_NEXT, or Db.DB_PREV flags were set and the log was opened with the DB_THREAD flag set; the Db.DB_SET flag was set and the specified log sequence number does not appear in the log; or if an invalid flag value or parameter was specified.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DbLogc.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Berkeley DB</b><br><font size="-1"> version 4.2.52</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/db/DbLockStat.html"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/db/DbLogStat.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DbLogc.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <font size=1><a href="../../../../sleepycat/legal.html">Copyright (c) 1996-2003</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font> </BODY> </HTML>