this(DEFAULT_MIN_RESPONSE_RATE, DEFAULT_MAX_CONTENT_SIZE, DEFAULT_CRAWL_END_TIME, DEFAULT_CRAWL_DELAY, DEFAULT_MAX_REDIRECTS);
}
public FetcherPolicy(int minResponseRate, int maxContentSize, long crawlEndTime, long crawlDelay, int maxRedirects) {
if (crawlDelay < 0) {
throw new InvalidParameterException("crawlDelay must be >= 0: " + crawlDelay);
}
// Catch common error of specifying crawl delay in seconds versus milliseconds
if ((crawlDelay < 100) && (crawlDelay != 0)) {
throw new InvalidParameterException("crawlDelay must be milliseconds, not seconds: " + crawlDelay);
}
_minResponseRate = minResponseRate;
_maxContentSize = maxContentSize;
_crawlEndTime = crawlEndTime;