⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 workqueue.html

📁 一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<HR><A NAME="getSessionBalance()"><!-- --></A><H3>getSessionBalance</H3><PRE>public int <B>getSessionBalance</B>()</PRE><DL><DD>Return current session 'activity budget balance'<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>session balance</DL></DD></DL><HR><A NAME="setTotalBudget(long)"><!-- --></A><H3>setTotalBudget</H3><PRE>public void <B>setTotalBudget</B>(long&nbsp;budget)</PRE><DL><DD>Set the total expenditure level allowable before queue is  considered inherently 'over-budget'.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>budget</CODE> - </DL></DD></DL><HR><A NAME="isOverBudget()"><!-- --></A><H3>isOverBudget</H3><PRE>public boolean <B>isOverBudget</B>()</PRE><DL><DD>Check whether queue has temporarily or permanently exceeded its budget.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if queue is over its set budget(s)</DL></DD></DL><HR><A NAME="getTotalExpenditure()"><!-- --></A><H3>getTotalExpenditure</H3><PRE>public long <B>getTotalExpenditure</B>()</PRE><DL><DD>Return the tally of all expenditures on this queue<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>total amount expended on this queue</DL></DD></DL><HR><A NAME="incrementSessionBalance(int)"><!-- --></A><H3>incrementSessionBalance</H3><PRE>public int <B>incrementSessionBalance</B>(int&nbsp;amount)</PRE><DL><DD>Increase the internal running budget to be used before  deactivating the queue<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>amount</CODE> - amount to increment<DT><B>Returns:</B><DD>updated budget value</DL></DD></DL><HR><A NAME="expend(int)"><!-- --></A><H3>expend</H3><PRE>public int <B>expend</B>(int&nbsp;amount)</PRE><DL><DD>Decrease the internal running budget by the given amount.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>amount</CODE> - tp decrement<DT><B>Returns:</B><DD>updated budget value</DL></DD></DL><HR><A NAME="refund(int)"><!-- --></A><H3>refund</H3><PRE>public int <B>refund</B>(int&nbsp;amount)</PRE><DL><DD>A URI should not have been charged against queue (eg it was disregarded); return the amount expended<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>amount</CODE> - to return<DT><B>Returns:</B><DD>updated budget value</DL></DD></DL><HR><A NAME="noteError(int)"><!-- --></A><H3>noteError</H3><PRE>public void <B>noteError</B>(int&nbsp;penalty)</PRE><DL><DD>Note an error and assess an extra penalty.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>penalty</CODE> - additional amount to deduct</DL></DD></DL><HR><A NAME="setWakeTime(long)"><!-- --></A><H3>setWakeTime</H3><PRE>public void <B>setWakeTime</B>(long&nbsp;l)</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - </DL></DD></DL><HR><A NAME="getWakeTime()"><!-- --></A><H3>getWakeTime</H3><PRE>public long <B>getWakeTime</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>wakeTime</DL></DD></DL><HR><A NAME="getClassKey()"><!-- --></A><H3>getClassKey</H3><PRE>public java.lang.String <B>getClassKey</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>classKey, the 'identifier', for this queue.</DL></DD></DL><HR><A NAME="clearHeld()"><!-- --></A><H3>clearHeld</H3><PRE>public void <B>clearHeld</B>()</PRE><DL><DD>Clear isHeld to false<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isHeld()"><!-- --></A><H3>isHeld</H3><PRE>public boolean <B>isHeld</B>()</PRE><DL><DD>Whether the queue is already in a lifecycle stage -- such as ready, in-progress, snoozed -- and thus should not be redundantly inserted to readyClassQueues<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>isHeld</DL></DD></DL><HR><A NAME="setHeld()"><!-- --></A><H3>setHeld</H3><PRE>public void <B>setHeld</B>()</PRE><DL><DD>Set isHeld to true<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="unpeek()"><!-- --></A><H3>unpeek</H3><PRE>public void <B>unpeek</B>()</PRE><DL><DD>Forgive the peek, allowing a subsequent peek to  return a different item.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>compareTo</H3><PRE>public final int <B>compareTo</B>(java.lang.Object&nbsp;obj)</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE>java.lang.Comparable</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="update(org.archive.crawler.frontier.WorkQueueFrontier, org.archive.crawler.datamodel.CrawlURI)"><!-- --></A><H3>update</H3><PRE>public void <B>update</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A>&nbsp;frontier,                   <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A>&nbsp;curi)</PRE><DL><DD>Update the given CrawlURI, which should already be present. (This is not checked.) Equivalent to an enqueue without affecting the count.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>frontier</CODE> - Work queues manager.<DD><CODE>curi</CODE> - CrawlURI to update.</DL></DD></DL><HR><A NAME="getCount()"><!-- --></A><H3>getCount</H3><PRE>public long <B>getCount</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Returns the count.</DL></DD></DL><HR><A NAME="insertItem(org.archive.crawler.frontier.WorkQueueFrontier, org.archive.crawler.datamodel.CrawlURI)"><!-- --></A><H3>insertItem</H3><PRE>protected abstract void <B>insertItem</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A>&nbsp;frontier,                                   <A HREF="../../../../org/archive/crawler/datamodel/CrawlURI.html" title="class in org.archive.crawler.datamodel">CrawlURI</A>&nbsp;curi)                            throws java.io.IOException</PRE><DL><DD>Insert the given curi, whether it is already present or not. Hook for subclasses.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>frontier</CODE> - WorkQueueFrontier.<DD><CODE>curi</CODE> - CrawlURI to insert.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if there was a problem while inserting the item</DL></DD></DL><HR><A NAME="deleteMatchingFromQueue(org.archive.crawler.frontier.WorkQueueFrontier, java.lang.String)"><!-- --></A><H3>deleteMatchingFromQueue</H3><PRE>protected abstract long <B>deleteMatchingFromQueue</B>(<A HREF="../../../../org/archive/crawler/frontier/WorkQueueFrontier.html" title="class in org.archive.crawler.frontier">WorkQueueFrontier</A>&nbsp;frontier,                                                java.lang.String&nbsp;match)                                         throws java.io.IOException</PRE><DL><DD>Delete URIs matching the given pattern from this queue.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -