public LinkRelevance nextURL(boolean asyncLoad) throws DataNotFoundException {
        Context timerContext = selectTimer.time();
        try {
            LinkRelevance link = scheduler.nextLink(asyncLoad);
            if (link == null) {
                if (scheduler.hasPendingLinks()) {
                    throw new DataNotFoundException(false, "No links available for selection right now.");
                } else {
                    throw new DataNotFoundException(true, "Frontier run out of links.");
                }
            }
            frontier.delete(link);

            schedulerLog.printf("%d\t%.5f\t%s\n", System.currentTimeMillis(),
                                link.getRelevance(), link.getURL().toString());
            return link;
        } finally {
            timerContext.stop();
        }
    }
This class manages the crawler frontier

@author Luciano Barbosa
@version 1.0
ache/src/main/java/achecrawler/link/frontier/FrontierManager.java