@Override
    public void startSelection(int numberOfLinks) {
        links = MinMaxPriorityQueue
            .orderedBy(new Comparator<RandomLink>() {
                @Override
                public int compare(RandomLink o1, RandomLink o2) {
                    return Double.compare(o1.relevance, o2.relevance);
                }
            })
            .maximumSize(numberOfLinks) // keep only top-k items
            .create();
    }
Implements a link selection strategy that picks links from the storage at random.
ache/src/main/java/achecrawler/link/frontier/selector/RandomLinkSelector.java