📄 heapfile.html
字号:
<TD><B>Methods inherited from class neustore.base.<A HREF="../../neustore/base/DBIndex.html" title="class in neustore.base">DBIndex</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../neustore/base/DBIndex.html#allocate()">allocate</A>, <A HREF="../../neustore/base/DBIndex.html#close()">close</A>, <A HREF="../../neustore/base/DBIndex.html#freePage(int)">freePage</A></CODE></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="HeapFile(neustore.base.DBBuffer, java.lang.String, boolean, neustore.base.Key, neustore.base.Data)"><!-- --></A><H3>
HeapFile</H3>
<PRE>
public <B>HeapFile</B>(<A HREF="../../neustore/base/DBBuffer.html" title="class in neustore.base">DBBuffer</A> _buffer, java.lang.String filename, boolean isCreate, <A HREF="../../neustore/base/Key.html" title="interface in neustore.base">Key</A> _sampleKey, <A HREF="../../neustore/base/Data.html" title="interface in neustore.base">Data</A> _sampleData) throws java.io.IOException</PRE>
<DL>
<DD>The HeapFile constructor. It takes as additional input a sample key and a sample data.
<P>
<DT><B>Parameters:</B><DD><CODE>_buffer</CODE> - the buffer<DD><CODE>isCreate</CODE> - whether create (or open)<DD><CODE>_sampleKey</CODE> - the sample key<DD><CODE>_sampleData</CODE> - the sample data<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></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="numRecs()"><!-- --></A><H3>
numRecs</H3>
<PRE>
public int <B>numRecs</B>()</PRE>
<DL>
<DD>Returns the number of records.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>number of records</DL>
</DD>
</DL>
<HR>
<A NAME="insert(neustore.base.Key, neustore.base.Data)"><!-- --></A><H3>
insert</H3>
<PRE>
public void <B>insert</B>(<A HREF="../../neustore/base/Key.html" title="interface in neustore.base">Key</A> key, <A HREF="../../neustore/base/Data.html" title="interface in neustore.base">Data</A> data) throws java.io.IOException</PRE>
<DL>
<DD>Inserts a new record into the heap file. Algorithm:<br> <ul>If there is no non-full page, <li> allocate; <li> insert to the new page; <li> add to the beginning of one linked list, depending on whether full; <li>Else <li> read the page in; <li> insert to this page; <li> if full, remove from non-full list and insert to full list. </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to be inserted<DD><CODE>data</CODE> - the data to be inserted<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="delete(neustore.base.Key)"><!-- --></A><H3>
delete</H3>
<PRE>
public boolean <B>delete</B>(<A HREF="../../neustore/base/Key.html" title="interface in neustore.base">Key</A> key) throws java.io.IOException</PRE>
<DL>
<DD>Deletes the record by the given key. After deletion, if the page is empty it should be set free. Otherwise, if the page change from full to nonfull, it should be removed from the full list and added to the nonfull list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the record to be deleted<DT><B>Returns:</B><DD>whether deleted<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="search(neustore.base.Key)"><!-- --></A><H3>
search</H3>
<PRE>
public <A HREF="../../neustore/base/Data.html" title="interface in neustore.base">Data</A> <B>search</B>(<A HREF="../../neustore/base/Key.html" title="interface in neustore.base">Key</A> key) throws java.io.IOException</PRE>
<DL>
<DD>Searches the record by the given key.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to search<DT><B>Returns:</B><DD><code>data</code> if found; <code>null</code> otherwise<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="printInformation()"><!-- --></A><H3>
printInformation</H3>
<PRE>
public void <B>printInformation</B>()</PRE>
<DL>
<DD>Prints some information about the index.
<P>
<DD><DL>
</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/HeapFile.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">
PREV CLASS
<A HREF="../../neustore/heapfile/HeapFilePage.html" title="class in neustore.heapfile"><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="HeapFile.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 | <A HREF="#fields_inherited_from_class_neustore.base.DBIndex">FIELD</A> | <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 + -