Java Reference
In-Depth Information
/**
* Setup this workload manager for the specified spider.
* This method is not used by the MemoryWorkloadManager.
*
* @param spider
* The spider using this workload manager.
* @throws WorkloadException
* Thrown if there is an error setting up the
* workload manager.
*/
public void init(Spider spider) throws WorkloadException {
}
/**
* Mark the specified URL as error.
*
* @param url
* The URL that had an error.
* @throws WorkloadException
* Thrown if the specified URL could not be
* marked.
*/
public void markError(URL url) {
this.workingCount--;
assert this.workingCount > 0;
this.waiting.remove(url);
setStatus(url, null, URLStatus.Status.ERROR, -1);
}
/**
* Mark the specified URL as successfully processed.
*
* @param url
* The URL to mark as processed.
* @throws WorkloadException
* Thrown if the specified URL could not be
* marked.
*/
public void markProcessed(URL url) {
this.workingCount--;
assert this.workingCount > 0;
this.waiting.remove(url);
setStatus(url, null, URLStatus.Status.PROCESSED, -1);
}
Search WWH ::




Custom Search