📄 toethread.html
字号:
Terminates a thread.</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/framework/ToeThread.html#progressStatisticsLegend(java.io.PrintWriter)">progressStatisticsLegend</A></B>(java.io.PrintWriter writer)</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/framework/ToeThread.html#progressStatisticsLine(java.io.PrintWriter)">progressStatisticsLine</A></B>(java.io.PrintWriter writer)</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/framework/ToeThread.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/framework/ToeThread.html#reportTo(java.lang.String, java.io.PrintWriter)">reportTo</A></B>(java.lang.String name, java.io.PrintWriter pw)</CODE><BR> Compiles and returns a report on its status.</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/framework/ToeThread.html#retire()">retire</A></B>()</CODE><BR> Request that this thread retire (exit cleanly) at the earliest opportunity.</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/framework/ToeThread.html#run()">run</A></B>()</CODE><BR> (non-Javadoc)</TD></TR><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/framework/ToeThread.html#shouldRetire()">shouldRetire</A></B>()</CODE><BR> Whether this thread should cleanly retire at the earliest opportunity.</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/framework/ToeThread.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/framework/ToeThread.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/framework/ToeThread.html#singleLineReportTo(java.io.PrintWriter)">singleLineReportTo</A></B>(java.io.PrintWriter w)</CODE><BR> Make a single-line summary report to the passed-in writer</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Thread"><!-- --></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.Thread</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield</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"><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, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ========= 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="ToeThread(org.archive.crawler.framework.ToePool, int)"><!-- --></A><H3>ToeThread</H3><PRE>public <B>ToeThread</B>(<A HREF="../../../../org/archive/crawler/framework/ToePool.html" title="class in org.archive.crawler.framework">ToePool</A> g, int sn)</PRE><DL><DD>Create a ToeThread<P><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - ToeThreadGroup<DD><CODE>sn</CODE> - serial number</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="run()"><!-- --></A><H3>run</H3><PRE>public void <B>run</B>()</PRE><DL><DD>(non-Javadoc)<P><DD><DL><DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE><DT><B>Overrides:</B><DD><CODE>run</CODE> in class <CODE>java.lang.Thread</CODE></DL></DD><DD><DL><DT><B>See Also:</B><DD><CODE>Thread.run()</CODE></DL></DD></DL><HR><A NAME="getSerialNumber()"><!-- --></A><H3>getSerialNumber</H3><PRE>public int <B>getSerialNumber</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Return toe thread serial number.</DL></DD></DL><HR><A NAME="getHttpRecorder()"><!-- --></A><H3>getHttpRecorder</H3><PRE>public <A HREF="../../../../org/archive/util/HttpRecorder.html" title="class in org.archive.util">HttpRecorder</A> <B>getHttpRecorder</B>()</PRE><DL><DD>Used to get current threads HttpRecorder instance. Implementation of the HttpRecorderMarker interface.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/archive/util/HttpRecorderMarker.html#getHttpRecorder()">getHttpRecorder</A></CODE> in interface <CODE><A HREF="../../../../org/archive/util/HttpRecorderMarker.html" title="interface in org.archive.util">HttpRecorderMarker</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Returns instance of HttpRecorder carried by this thread.<DT><B>See Also:</B><DD><A HREF="../../../../org/archive/util/HttpRecorderMarker.html#getHttpRecorder()"><CODE>HttpRecorderMarker.getHttpRecorder()</CODE></A></DL></DD></DL><HR><A NAME="getController()"><!-- --></A><H3>getController</H3><PRE>public <A HREF="../../../../org/archive/crawler/framework/CrawlController.html" title="class in org.archive.crawler.framework">CrawlController</A> <B>getController</B>()</PRE><DL><DD>Get the CrawlController acossiated with this thread.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Returns the CrawlController.</DL></DD></DL><HR><A NAME="kill()"><!-- --></A><H3>kill</H3><PRE>protected void <B>kill</B>()</PRE><DL><DD>Terminates a thread. <p> Calling this method will ensure that the current thread will stop processing as soon as possible (note: this may be never). Meant to 'short circuit' hung threads. <p> Current crawl uri will have its fetch status set accordingly and will be immediately returned to the frontier. <p> As noted before, this does not ensure that the thread will stop running (ever). But once evoked it will not try and communicate with other parts of crawler and will terminate as soon as control is established.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getStep()"><!-- --></A><H3>getStep</H3><PRE>public java.lang.Object <B>getStep</B>()</PRE><DL><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Current step (For debugging/reporting, give abstract step where this thread is).</DL></DD></DL><HR><A NAME="isActive()"><!-- --></A><H3>isActive</H3><PRE>public boolean <B>isActive</B>()</PRE><DL><DD>Is this thread processing a URI, not paused or waiting for a URI?<P><DD><DL></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -