Java Reference
In-Depth Information
if (this.hostResultSet != null)
{
this.hostResultSet.close();
}
this.hostResultSet = this.stmtGetNextHost
.executeQuery(Status.STATUS_WAITING);
if (!this.hostResultSet.getResultSet().next())
{
return null;
}
}
this.currentHostID =
this.hostResultSet.getResultSet().getInt(1);
this.currentHost =
this.hostResultSet.getResultSet().getString(2);
this.stmtSetHostStatus.execute(Status.STATUS_PROCESSING,
this.currentHostID);
logger.log(Level.INFO, "Moving to new host: "
+ this.currentHost);
return this.currentHost;
} catch (SQLException e)
{
throw (new WorkloadException(e));
}
}
/**
* Setup the workload so that it can be resumed from where
* the last spider left the workload.
*
* @throws WorkloadException
* Thrown if we were unable to resume the
* processing.
*/
public void resume() throws WorkloadException
{
RepeatableStatement.Results rs = null;
try
{
rs = this.stmtResume.executeQuery();
Search WWH ::




Custom Search