From 33d1062c79b6b9b1ab2718e41a3f8791abcb9275 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Sat, 21 Apr 2012 13:34:07 +0200 Subject: [PATCH] refactoring: the cache belongs to the crawler --- htroot/CacheResource_p.java | 2 +- htroot/ConfigHTCache_p.java | 2 +- htroot/IndexControlRWIs_p.java | 2 +- htroot/ProxyIndexingMonitor_p.java | 2 +- htroot/ViewFile.java | 2 +- source/de/anomic/crawler/Balancer.java | 1 - source/de/anomic/{http/client => crawler}/Cache.java | 2 +- source/de/anomic/http/server/HTTPDProxyHandler.java | 2 +- source/net/yacy/peers/graphics/OSMTile.java | 2 +- source/net/yacy/repository/LoaderDispatcher.java | 2 +- source/net/yacy/search/Switchboard.java | 2 +- source/net/yacy/search/query/SnippetProcess.java | 2 +- source/net/yacy/search/snippet/TextSnippet.java | 2 +- 13 files changed, 12 insertions(+), 13 deletions(-) rename source/de/anomic/{http/client => crawler}/Cache.java (96%) diff --git a/htroot/CacheResource_p.java b/htroot/CacheResource_p.java index e468b144e..091480c64 100644 --- a/htroot/CacheResource_p.java +++ b/htroot/CacheResource_p.java @@ -31,7 +31,7 @@ import net.yacy.document.ImageParser; import net.yacy.kelondro.data.meta.DigestURI; import net.yacy.kelondro.logging.Log; -import de.anomic.http.client.Cache; +import de.anomic.crawler.Cache; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; import de.anomic.server.servletProperties; diff --git a/htroot/ConfigHTCache_p.java b/htroot/ConfigHTCache_p.java index 010b0dd0e..b76087172 100644 --- a/htroot/ConfigHTCache_p.java +++ b/htroot/ConfigHTCache_p.java @@ -33,8 +33,8 @@ import net.yacy.cora.protocol.RequestHeader; import net.yacy.search.Switchboard; import net.yacy.search.SwitchboardConstants; +import de.anomic.crawler.Cache; import de.anomic.data.WorkTables; -import de.anomic.http.client.Cache; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java index 1f02fca7e..c87f244c9 100644 --- a/htroot/IndexControlRWIs_p.java +++ b/htroot/IndexControlRWIs_p.java @@ -68,10 +68,10 @@ import net.yacy.search.query.RWIProcess; import net.yacy.search.query.SearchEventCache; import net.yacy.search.ranking.BlockRank; import net.yacy.search.ranking.ReferenceOrder; +import de.anomic.crawler.Cache; import de.anomic.crawler.ResultURLs; import de.anomic.data.ListManager; import de.anomic.data.WorkTables; -import de.anomic.http.client.Cache; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; diff --git a/htroot/ProxyIndexingMonitor_p.java b/htroot/ProxyIndexingMonitor_p.java index 05b682b9e..98553fd23 100644 --- a/htroot/ProxyIndexingMonitor_p.java +++ b/htroot/ProxyIndexingMonitor_p.java @@ -34,7 +34,7 @@ import net.yacy.kelondro.logging.Log; import net.yacy.search.Switchboard; import net.yacy.search.SwitchboardConstants; -import de.anomic.http.client.Cache; +import de.anomic.crawler.Cache; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java index 08df8813b..601a60506 100644 --- a/htroot/ViewFile.java +++ b/htroot/ViewFile.java @@ -53,8 +53,8 @@ import net.yacy.kelondro.data.meta.URIMetadataRow; import net.yacy.search.Switchboard; import net.yacy.search.index.Segment; import net.yacy.search.index.Segments; +import de.anomic.crawler.Cache; import de.anomic.crawler.retrieval.Response; -import de.anomic.http.client.Cache; import de.anomic.server.serverObjects; import de.anomic.server.serverSwitch; diff --git a/source/de/anomic/crawler/Balancer.java b/source/de/anomic/crawler/Balancer.java index dd39affc3..5fc56772b 100644 --- a/source/de/anomic/crawler/Balancer.java +++ b/source/de/anomic/crawler/Balancer.java @@ -53,7 +53,6 @@ import net.yacy.kelondro.order.Base64Order; import net.yacy.kelondro.table.Table; import net.yacy.kelondro.util.MemoryControl; import de.anomic.crawler.retrieval.Request; -import de.anomic.http.client.Cache; public class Balancer { diff --git a/source/de/anomic/http/client/Cache.java b/source/de/anomic/crawler/Cache.java similarity index 96% rename from source/de/anomic/http/client/Cache.java rename to source/de/anomic/crawler/Cache.java index f89f1d10c..9bc6047d0 100644 --- a/source/de/anomic/http/client/Cache.java +++ b/source/de/anomic/crawler/Cache.java @@ -32,7 +32,7 @@ the class shall also be used to do a cache-cleaning and index creation */ -package de.anomic.http.client; +package de.anomic.crawler; import java.io.File; import java.io.IOException; diff --git a/source/de/anomic/http/server/HTTPDProxyHandler.java b/source/de/anomic/http/server/HTTPDProxyHandler.java index be6a7bf70..ec4787c9e 100644 --- a/source/de/anomic/http/server/HTTPDProxyHandler.java +++ b/source/de/anomic/http/server/HTTPDProxyHandler.java @@ -87,9 +87,9 @@ import net.yacy.kelondro.util.FileUtils; import net.yacy.repository.Blacklist; import net.yacy.search.Switchboard; import net.yacy.search.SwitchboardConstants; +import de.anomic.crawler.Cache; import de.anomic.crawler.retrieval.Request; import de.anomic.crawler.retrieval.Response; -import de.anomic.http.client.Cache; import de.anomic.server.serverCore; import de.anomic.server.serverObjects; diff --git a/source/net/yacy/peers/graphics/OSMTile.java b/source/net/yacy/peers/graphics/OSMTile.java index 981d4edc2..484b39240 100644 --- a/source/net/yacy/peers/graphics/OSMTile.java +++ b/source/net/yacy/peers/graphics/OSMTile.java @@ -39,8 +39,8 @@ import net.yacy.kelondro.data.meta.DigestURI; import net.yacy.kelondro.logging.Log; import net.yacy.search.Switchboard; import net.yacy.visualization.RasterPlotter; +import de.anomic.crawler.Cache; import de.anomic.crawler.retrieval.Response; -import de.anomic.http.client.Cache; public class OSMTile { diff --git a/source/net/yacy/repository/LoaderDispatcher.java b/source/net/yacy/repository/LoaderDispatcher.java index d13db5e2d..0a1e1a975 100644 --- a/source/net/yacy/repository/LoaderDispatcher.java +++ b/source/net/yacy/repository/LoaderDispatcher.java @@ -54,6 +54,7 @@ import net.yacy.kelondro.logging.Log; import net.yacy.kelondro.util.FileUtils; import net.yacy.search.Switchboard; import net.yacy.search.index.Segments; +import de.anomic.crawler.Cache; import de.anomic.crawler.CrawlProfile; import de.anomic.crawler.ZURL.FailCategory; import de.anomic.crawler.retrieval.FTPLoader; @@ -62,7 +63,6 @@ import de.anomic.crawler.retrieval.HTTPLoader; import de.anomic.crawler.retrieval.Request; import de.anomic.crawler.retrieval.Response; import de.anomic.crawler.retrieval.SMBLoader; -import de.anomic.http.client.Cache; public final class LoaderDispatcher { diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index 244dc37d8..53abb613a 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -150,6 +150,7 @@ import net.yacy.search.query.SearchEventCache; import net.yacy.search.ranking.BlockRank; import net.yacy.search.ranking.RankingProfile; import net.yacy.search.snippet.ContentDomain; +import de.anomic.crawler.Cache; import de.anomic.crawler.CrawlProfile; import de.anomic.crawler.CrawlQueues; import de.anomic.crawler.CrawlStacker; @@ -174,7 +175,6 @@ import de.anomic.data.WorkTables; import de.anomic.data.wiki.WikiBoard; import de.anomic.data.wiki.WikiCode; import de.anomic.data.wiki.WikiParser; -import de.anomic.http.client.Cache; import de.anomic.http.server.RobotsTxtConfig; import de.anomic.server.serverCore; import de.anomic.server.serverSwitch; diff --git a/source/net/yacy/search/query/SnippetProcess.java b/source/net/yacy/search/query/SnippetProcess.java index 90d23075a..39898a502 100644 --- a/source/net/yacy/search/query/SnippetProcess.java +++ b/source/net/yacy/search/query/SnippetProcess.java @@ -60,8 +60,8 @@ import net.yacy.search.snippet.TextSnippet; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; +import de.anomic.crawler.Cache; import de.anomic.data.WorkTables; -import de.anomic.http.client.Cache; public class SnippetProcess { diff --git a/source/net/yacy/search/snippet/TextSnippet.java b/source/net/yacy/search/snippet/TextSnippet.java index 20c6b44b8..30a80008b 100644 --- a/source/net/yacy/search/snippet/TextSnippet.java +++ b/source/net/yacy/search/snippet/TextSnippet.java @@ -266,7 +266,7 @@ public class TextSnippet implements Comparable, Comparator