@Override public void urlWithError(String url, Exception e) { if (failedError(e)) { //mark this url as failed. failedUrls.put(url, true); if (failedUrls.size() == urls.length) { // simple assumption to consider all of them as active to try out the existing failed URLs. failedUrls.invalidateAll(); } } }