📄 adaptiverevisithostqueue.html
字号:
java.io.IOException</PRE><DL><DD>Returns the URI with the earliest time of next processing. I.e. the URI at the head of this host based priority queue. <p> Note: This method will return the head CrawlURI regardless of wether it is safe to start processing it or not. CrawlURI will remain in the queue. The returned CrawlURI should only be used for queue inspection, it can <i>not</i> be updated and returned to the queue. To get URIs ready for processing use <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#next()"><CODE>next()</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the URI with the earliest time of next processing or null if the queue is empty or all URIs are currently being processed.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE><DD><CODE>java.io.IOException</CODE> - if an error occurs reading from the database</DL></DD></DL><HR><A NAME="getState()"><!-- --></A><H3>getState</H3><PRE>public int <B>getState</B>()</PRE><DL><DD>Returns the current state of the HQ.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the current state of the HQ.<DT><B>See Also:</B><DD><A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#HQSTATE_BUSY"><CODE>HQSTATE_BUSY</CODE></A>, <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#HQSTATE_EMPTY"><CODE>HQSTATE_EMPTY</CODE></A>, <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#HQSTATE_READY"><CODE>HQSTATE_READY</CODE></A>, <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#HQSTATE_SNOOZED"><CODE>HQSTATE_SNOOZED</CODE></A></DL></DD></DL><HR><A NAME="getNextReadyTime()"><!-- --></A><H3>getNextReadyTime</H3><PRE>public long <B>getNextReadyTime</B>()</PRE><DL><DD>Returns the time when the HQ will next be ready to issue a URI. <p> If the queue is in a <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#HQSTATE_SNOOZED"><CODE>snoozed</CODE></A> state then this time will be in the future and reflects either the time when the HQ will again be able to issue URIs for processing because politness constraints have ended, or when a URI next becomes available for visit, whichever is larger. <p> If the queue is in a <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#HQSTATE_READY"><CODE>ready</CODE></A> state this time will be in the past and reflect the earliest time when the HQ had a URI ready for processing, taking time spent snoozed for politness concerns into account. <p> If the HQ is in any other state then the return value of this method is equal to Long.MAX_VALUE. <p> This value may change each time a URI is added, issued or updated.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the time when the HQ will next be ready to issue a URI</DL></DD></DL><HR><A NAME="setNextReadyTime(long)"><!-- --></A><H3>setNextReadyTime</H3><PRE>protected void <B>setNextReadyTime</B>(long newTime)</PRE><DL><DD>Updates nextReadyTime (if smaller) with the supplied value<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newTime</CODE> - the new value of nextReady Time;</DL></DD></DL><HR><A NAME="reorder()"><!-- --></A><H3>reorder</H3><PRE>protected void <B>reorder</B>()</PRE><DL><DD>Method is called whenever something has been done that might have changed the value of the 'published' time of next ready. If an owner has been specified it will be notified that the value may have changed..<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getStateByName()"><!-- --></A><H3>getStateByName</H3><PRE>public java.lang.String <B>getStateByName</B>()</PRE><DL><DD>Same as <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html#getState()"><CODE>getState()</CODE></A> except this method returns a human readable name for the state instead of its constant integer value. <p> Should only be used for reports, error messages and other strings intended for human eyes.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the human readable name of the current state</DL></DD></DL><HR><A NAME="getSize()"><!-- --></A><H3>getSize</H3><PRE>public long <B>getSize</B>()</PRE><DL><DD>Returns the size of the HQ. That is, the number of URIs queued, including any that are currently being processed.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the size of the HQ.</DL></DD></DL><HR><A NAME="setOwner(org.archive.crawler.frontier.AdaptiveRevisitQueueList)"><!-- --></A><H3>setOwner</H3><PRE>public void <B>setOwner</B>(<A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitQueueList.html" title="class in org.archive.crawler.frontier">AdaptiveRevisitQueueList</A> owner)</PRE><DL><DD>Set the AdaptiveRevisitQueueList object that contains this HQ. Will cause that object to be notified (via <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitQueueList.html#reorder(org.archive.crawler.frontier.AdaptiveRevisitHostQueue)"><CODE>reorder()</CODE></A> when the value used for sorting the list of HQs changes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>owner</CODE> - the ARHostQueueList object that contains this HQ.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>() throws java.io.IOException</PRE><DL><DD>Cleanup all open Berkeley Database objects. <p> Does <I>not</I> close the Environment.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if an error occurs closing a database object</DL></DD></DL><HR><A NAME="report(int)"><!-- --></A><H3>report</H3><PRE>public java.lang.String <B>report</B>(int max)</PRE><DL><DD>Returns a report detailing the status of this HQ.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>max</CODE> - Maximum number of URIs to show. 0 equals no limit.<DT><B>Returns:</B><DD>a report detailing the status of this HQ.</DL></DD></DL><HR><A NAME="getSubstats()"><!-- --></A><H3>getSubstats</H3><PRE>public <A HREF="../../../../org/archive/crawler/datamodel/CrawlSubstats.html" title="class in org.archive.crawler.datamodel">CrawlSubstats</A> <B>getSubstats</B>()</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/crawler/datamodel/CrawlSubstats.HasCrawlSubstats.html#getSubstats()">getSubstats</A></CODE> in interface <CODE><A HREF="../../../../org/archive/crawler/datamodel/CrawlSubstats.HasCrawlSubstats.html" title="interface in org.archive.crawler.datamodel">CrawlSubstats.HasCrawlSubstats</A></CODE></DL></DD><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=2 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/AdaptiveRevisitHostQueue.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitFrontier.html" title="class in org.archive.crawler.frontier"><B>PREV CLASS</B></A> <A HREF="../../../../org/archive/crawler/frontier/AdaptiveRevisitQueueList.html" title="class in org.archive.crawler.frontier"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html" target="_top"><B>FRAMES</B></A> <A HREF="AdaptiveRevisitHostQueue.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="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <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>Copyright © 2003-2006 Internet Archive. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -