Java Reference
In-Depth Information
* @return Returns true if there are no more workload
* units.
* @throws WorkloadException
* Thrown if there was an error determining if
* the workload is empty.
*/
public boolean workloadEmpty() {
if (!this.waiting.isEmpty()) {
return false;
}
return (this.workingCount < 1);
}
/**
* Set the source, status and depth for the specified URL.
*
* @param url
* The URL to set.
* @param source
* The source of this URL.
* @param status
* The status of this URL.
* @param depth
* The depth of this URL.
*/
private void setStatus(URL url, URL source,
URLStatus.Status status, int depth) {
URLStatus s = this.workload.get(url);
if (s == null) {
s = new URLStatus();
this.workload.put(url, s);
}
s.setStatus(status);
if (source != null) {
s.setSource(source);
}
if (depth != -1) {
s.setDepth(depth);
}
}
}
Search WWH ::




Custom Search