Java Reference
In-Depth Information
/**
* Get the current host.
*
* @return The current host.
*/
public String getCurrentHost()
{
return this.currentHost;
}
/**
* Get the depth of the specified URL.
*
* @param url
* The URL to get the depth of.
* @return The depth of the specified URL.
* @throws WorkloadException
* Thrown if the depth could not be found.
*/
public int getDepth(URL url) throws WorkloadException
{
RepeatableStatement.Results rs = null;
try
{
rs = this.stmtGetDepth.executeQuery(computeHash(url));
while (rs.getResultSet().next())
{
String u = rs.getResultSet().getString(1);
if (u.equals(url.toString()))
{
return rs.getResultSet().getInt(2);
}
}
return 1;
} catch (SQLException e)
{
throw (new WorkloadException(e));
} finally
{
if (rs != null)
{
rs.close();
}
}
}
Search WWH ::




Custom Search