Java Reference
In-Depth Information
{
setStatus(url, Status.STATUS_DONE);
this.workLatch.countDown();
} catch (SQLException e)
{
throw (new WorkloadException(e));
}
}
/**
* Move on to process the next host. This should only be
* called after getWork returns null.
*
* @return The name of the next host.
* @throws WorkloadException
* Thrown if the workload manager was unable to
* move to the next host.
*/
public String nextHost() throws WorkloadException
{
if (this.currentHostID == -1)
{
throw new WorkloadException(
"Attempting to obtain host before adding first URL.");
} else
{
markHostProcessed(this.currentHost);
}
try
{
boolean requery = false;
if (this.hostResultSet == null)
{
requery = true;
} else
{
if (!this.hostResultSet.getResultSet().next())
{
requery = true;
}
}
if (requery)
{
Search WWH ::




Custom Search