}
@Override
protected ProcessResult innerProcessResult(CrawlURI curi)
throws InterruptedException {
CrawlController controller = getCrawlController();
StatisticsTracker stats = getStatisticsTracker();
long allowedRuntimeMs = getRuntimeSeconds() * 1000L;
long currentRuntimeMs = stats.getCrawlElapsedTime();
if(currentRuntimeMs > allowedRuntimeMs){
Operation op = getExpirationOperation();
if(op != null){
if (op.equals(Operation.PAUSE)) {
controller.requestCrawlPause();
} else if (op.equals(Operation.TERMINATE)){
controller.requestCrawlStop(CrawlStatus.FINISHED_TIME_LIMIT);
} else if (op.equals(Operation.BLOCK_URIS)) {
curi.setFetchStatus(S_BLOCKED_BY_RUNTIME_LIMIT);
curi.getAnnotations().add("Runtime exceeded " + allowedRuntimeMs +
"ms");
return ProcessResult.FINISH;