yacy_search_server/source/de/anomic/plasma/urlPattern/plasmaURLPattern.java
orbiter daf0f74361 joined anomic.net.URL, plasmaURL and url hash computation:
search profiling showed, that a major amount of time is wasted by computing url hashes. The computation does an intranet-check, which needs a DNS lookup. This caused that each urlhash computation needed 100-200 milliseconds, which caused remote searches to delay at least 1 second more that necessary. The solution to this problem is to attach a URL hash to the URL data structure, because that means that the url hash value can be filled after retrieval of the URL from the database. The redesign of the url/urlhash management caused a major redesign of many parts of the software. Since some parts had been decided to be given up they had been removed during this change to avoid unnecessary maintenance of unused code.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4074 6c8d7289-2bf4-0310-a012-ef5d649a1542
2007-09-05 09:01:35 +00:00

55 lines
1.7 KiB
Java

package de.anomic.plasma.urlPattern;
import java.io.File;
import de.anomic.yacy.yacyURL;
public interface plasmaURLPattern {
public static final String BLACKLIST_DHT = "dht";
public static final String BLACKLIST_CRAWLER = "crawler";
public static final String BLACKLIST_PROXY = "proxy";
public static final String BLACKLIST_SEARCH = "search";
public static final String BLACKLIST_SURFTIPS = "surftips";
public static final String BLACKLIST_NEWS = "news";
public static final class blacklistFile {
private final String filename;
private final String type;
public blacklistFile(String filename, String type) {
this.filename = filename;
this.type = type;
}
public String getFileName() { return this.filename; }
public String getType() { return this.type; }
}
public String getEngineInfo();
public void setRootPath(File rootPath);
public int blacklistCacheSize();
public int size();
public void clear();
public void removeAll(String blacklistType, String host);
public void remove(String blacklistType, String host, String path);
public void add(String blacklistType, String host, String path);
public void loadList(String blacklistType, String filenames, String sep);
public void loadList(blacklistFile[] blFiles, String sep);
public boolean hashInBlacklistedCache(String blacklistType, String urlHash);
public boolean isListed(String blacklistType, yacyURL url);
public boolean isListed(String blacklistType, String hostlow, String path);
}