📄 dbbuffer.html
字号:
int pageID, <A HREF="../../neustore/base/DBPage.html" title="class in neustore.base">DBPage</A> dbpage)</CODE>
<BR>
Writes a DBPage to buffer.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="DBBuffer(int, int)"><!-- --></A><H3>
DBBuffer</H3>
<PRE>
public <B>DBBuffer</B>(int bufferSize, int pageSize)</PRE>
<DL>
<DD>Opens an existing Database file.
<P>
<DT><B>Parameters:</B><DD><CODE>bufferSize</CODE> - total number of buffer pages<DD><CODE>pageSize</CODE> - page size</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getIOs()"><!-- --></A><H3>
getIOs</H3>
<PRE>
public int[] <B>getIOs</B>()</PRE>
<DL>
<DD>Reports the disk/buffer I/Os. There are four I/Os reported: <i>disk-read</i>, <i>disk-write</i>, <i>buffer-read</i> and <i>buffer-write</i>. They are stored in the integer array in the above order.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the four I/Os</DL>
</DD>
</DL>
<HR>
<A NAME="clearIOs()"><!-- --></A><H3>
clearIOs</H3>
<PRE>
public void <B>clearIOs</B>()</PRE>
<DL>
<DD>Resets the four counters <code>bufferReadIO</code>, etc.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="readPage(java.io.RandomAccessFile, int)"><!-- --></A><H3>
readPage</H3>
<PRE>
public <A HREF="../../neustore/base/DBBufferReturnElement.html" title="class in neustore.base">DBBufferReturnElement</A> <B>readPage</B>(java.io.RandomAccessFile file, int pageID) throws java.io.IOException</PRE>
<DL>
<DD>Returns a buffered page. If it is in buffer, returns it. Otherwise, loads it from disk and then returns it. Increases <code>bufferReadIO</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - which file<DD><CODE>pageID</CODE> - page ID<DT><B>Returns:</B><DD>the buffered page<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="writePage(java.io.RandomAccessFile, int, neustore.base.DBPage)"><!-- --></A><H3>
writePage</H3>
<PRE>
public void <B>writePage</B>(java.io.RandomAccessFile file, int pageID, <A HREF="../../neustore/base/DBPage.html" title="class in neustore.base">DBPage</A> dbpage) throws java.io.IOException</PRE>
<DL>
<DD>Writes a DBPage to buffer.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>pageID</CODE> - the page ID<DD><CODE>dbpage</CODE> - the DBPage object<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="pin(java.io.RandomAccessFile, int)"><!-- --></A><H3>
pin</H3>
<PRE>
public void <B>pin</B>(java.io.RandomAccessFile file, int pageID)</PRE>
<DL>
<DD>Pins a page. Such pages can not be swapped out of the buffer. The pinCount in DBBufferStoredElement is increased by 1.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>pageID</CODE> - the page ID of the page to be pinned</DL>
</DD>
</DL>
<HR>
<A NAME="unpin(java.io.RandomAccessFile, int)"><!-- --></A><H3>
unpin</H3>
<PRE>
public void <B>unpin</B>(java.io.RandomAccessFile file, int pageID)</PRE>
<DL>
<DD>Unpins a page. The pinCount in DBBufferStoredElement is decreased by 1.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - the file<DD><CODE>pageID</CODE> - the page ID of the page to be unpinned</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/DBBuffer.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-files/index-1.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../neustore/base/ByteArray.html" title="class in neustore.base"><B>PREV CLASS</B></A>
<A HREF="../../neustore/base/DBBufferReturnElement.html" title="class in neustore.base"><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="DBBuffer.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -