Make Recorder facility usable independent of special crawler threads

* Recorder.java
    store reusable per-thread Recorder instance in Recorder static thread-local
* ToeThread.java
    setup reusable instance into Recorder
* RecorderMarker.java
    deleted -- unnecessary
This commit is contained in:
gojomo committed 2010-01-26 01:21:59 +00:00
1 parent f35da10154
commit 248f720cab
3 files changed
+10 -52

No files matched your search

@@ -45,7 +45,6 @@ import org.archive.util.DevUtils;
import org.archive.util.MultiReporter;
import org.archive.util.ProgressStatisticsReporter;
import org.archive.util.Recorder;
import org.archive.util.RecorderMarker;
import com.sleepycat.util.RuntimeExceptionWrapper;
@@ -56,7 +55,7 @@ import com.sleepycat.util.RuntimeExceptionWrapper;
* @author Gordon Mohr
*/
public class ToeThread extends Thread
implements RecorderMarker, MultiReporter, ProgressStatisticsReporter,
implements MultiReporter, ProgressStatisticsReporter,
HostResolver, SinkHandlerLogThread, ChainStatusReceiver {
public enum Step {
@@ -123,6 +122,7 @@ implements RecorderMarker, MultiReporter, ProgressStatisticsReporter,
public void run() {
String name = controller.getMetadata().getJobName();
logger.fine(getName()+" started for order '"+name+"'");
Recorder.setHttpRecorder(httpRecorder);
try {
while ( true ) {
@@ -303,16 +303,6 @@ implements RecorderMarker, MultiReporter, ProgressStatisticsReporter,
public int getSerialNumber() {
return this.serialNumber;
}
/**
* Used to get current threads HttpRecorder instance.
* Implementation of the HttpRecorderMarker interface.
* @return Returns instance of HttpRecorder carried by this thread.
* @see org.archive.util.RecorderMarker#getHttpRecorder()
*/
public Recorder getHttpRecorder() {
return this.httpRecorder;
}
/** Get the CrawlController acossiated with this thread.
*