📄 workqueue.html
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#isRetired()">isRetired</A></B>()</CODE><BR> </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="../../../../org/archive/crawler/frontier/WorkQueue.html#noteError(int)">noteError</A></B>(int penalty)</CODE><BR> Note an error and assess an extra penalty.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#peek(org.archive.crawler.frontier.WorkQueueFrontier)">peek</A></B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier)</CODE><BR> Return the topmost queue item -- and remember it, such that even later higher-priority inserts don't change it.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#peekItem(org.archive.crawler.frontier.WorkQueueFrontier)">peekItem</A></B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier)</CODE><BR> Returns first item from queue (does not delete)</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="../../../../org/archive/crawler/frontier/WorkQueue.html#refund(int)">refund</A></B>(int amount)</CODE><BR> A URI should not have been charged against queue (eg it was disregarded); return the amount expended</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="../../../../org/archive/crawler/frontier/WorkQueue.html#reportTo(java.io.PrintWriter)">reportTo</A></B>(java.io.PrintWriter writer)</CODE><BR> Make a default report to the passed-in Writer.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#reportTo(java.lang.String, java.io.PrintWriter)">reportTo</A></B>(java.lang.String name, java.io.PrintWriter writer)</CODE><BR> Make a report of the given name to the passed-in Writer, If null, give the default report.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#resume(org.archive.crawler.frontier.WorkQueueFrontier)">resume</A></B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier)</CODE><BR> Resumes this WorkQueue.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#setActive(org.archive.crawler.frontier.WorkQueueFrontier, boolean)">setActive</A></B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier, boolean b)</CODE><BR> </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="../../../../org/archive/crawler/frontier/WorkQueue.html#setHeld()">setHeld</A></B>()</CODE><BR> Set isHeld to true</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="../../../../org/archive/crawler/frontier/WorkQueue.html#setRetired(boolean)">setRetired</A></B>(boolean b)</CODE><BR> Set the retired status of this queue.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#setSessionBalance(int)">setSessionBalance</A></B>(int balance)</CODE><BR> Set the session 'activity budget balance' to the given value</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="../../../../org/archive/crawler/frontier/WorkQueue.html#setTotalBudget(long)">setTotalBudget</A></B>(long budget)</CODE><BR> Set the total expenditure level allowable before queue is considered inherently 'over-budget'.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#setWakeTime(long)">setWakeTime</A></B>(long l)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#singleLineLegend()">singleLineLegend</A></B>()</CODE><BR> Return a legend for the single-line summary report as a String.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#singleLineReport()">singleLineReport</A></B>()</CODE><BR> Return a short single-line summary report as a String.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#singleLineReportTo(java.io.PrintWriter)">singleLineReportTo</A></B>(java.io.PrintWriter writer)</CODE><BR> Make a single-line summary report to the passed-in writer</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/frontier/WorkQueue.html#suspend(org.archive.crawler.frontier.WorkQueueFrontier)">suspend</A></B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier)</CODE><BR> Suspends this WorkQueue.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#unpeek()">unpeek</A></B>()</CODE><BR> Forgive the peek, allowing a subsequent peek to return a different item.</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="../../../../org/archive/crawler/frontier/WorkQueue.html#update(org.archive.crawler.frontier.WorkQueueFrontier, org.archive.crawler.datamodel.CrawlURI)">update</A></B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier, <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A> curi)</CODE><BR> Update the given CrawlURI, which should already be present.</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"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="classKey"><!-- --></A><H3>classKey</H3><PRE>protected final java.lang.String <B>classKey</B></PRE><DL><DD>The classKey<P><DL></DL></DL><HR><A NAME="substats"><!-- --></A><H3>substats</H3><PRE>protected <A HREF="../../../../org/archive/crawler/datamodel/CrawlSubstats.html" title="class in org.archive.crawler.datamodel">CrawlSubstats</A> <B>substats</B></PRE><DL><DD>Substats for all CrawlURIs in this group<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="WorkQueue(java.lang.String)"><!-- --></A><H3>WorkQueue</H3><PRE>public <B>WorkQueue</B>(java.lang.String pClassKey)</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="deleteMatching(org.archive.crawler.frontier.WorkQueueFrontier, java.lang.String)"><!-- --></A><H3>deleteMatching</H3><PRE>public long <B>deleteMatching</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier, java.lang.String match)</PRE><DL><DD>Delete URIs matching the given pattern from this queue.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>frontier</CODE> - <DD><CODE>match</CODE> - <DT><B>Returns:</B><DD>count of deleted URIs</DL></DD></DL><HR><A NAME="enqueue(org.archive.crawler.frontier.WorkQueueFrontier, org.archive.crawler.datamodel.CrawlURI)"><!-- --></A><H3>enqueue</H3><PRE>public void <B>enqueue</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier, <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A> curi)</PRE><DL><DD>Add the given CrawlURI, noting its addition in running count. (It should not already be present.)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>frontier</CODE> - Work queues manager.<DD><CODE>curi</CODE> - CrawlURI to insert.</DL></DD></DL><HR><A NAME="peek(org.archive.crawler.frontier.WorkQueueFrontier)"><!-- --></A><H3>peek</H3><PRE>public <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A> <B>peek</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier)</PRE><DL><DD>Return the topmost queue item -- and remember it, such that even later higher-priority inserts don't change it. TODO: evaluate if this is really necessary<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>frontier</CODE> - Work queues manager<DT><B>Returns:</B><DD>topmost queue item, or null</DL></DD></DL><HR><A NAME="dequeue(org.archive.crawler.frontier.WorkQueueFrontier)"><!-- --></A><H3>dequeue</H3><PRE>public void <B>dequeue</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A> frontier)</PRE><DL><DD>Remove the peekItem from the queue and adjusts the count.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>frontier</CODE> - Work queues manager.</DL></DD></DL><HR><A NAME="setSessionBalance(int)"><!-- --></A><H3>setSessionBalance</H3><PRE>public void <B>setSessionBalance</B>(int balance)</PRE><DL><DD>Set the session 'activity budget balance' to the given value<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>balance</CODE> - to use</DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -