public interface Frontier extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
addNewUri(CrawleableUri uri)
|
void |
addNewUris(List<CrawleableUri> newUris)
Adds the given list of URIs to the
Frontier. |
void |
crawlingDone(List<CrawleableUri> uris)
This method should be called after a list of URIs have been requested
using the
getNextUris() method and the crawling has been
finished. |
boolean |
doesRecrawling()
Indicates whether this frontier does recrawling.
|
List<CrawleableUri> |
getNextUris()
Returns the next chunk of URIs that should be crawled or null.
|
int |
getNumberOfPendingUris()
(optional) Returns the number of URIs that have been requested from the
Frontier using
getNextUris() and have not been marked as
crawled using Frontier#crawlingDone(Map). |
List<CrawleableUri> getNextUris()
#crawlingDone(Dictionary) method.void addNewUri(CrawleableUri uri)
uri - the URI that should be added to the Frontiervoid addNewUris(List<CrawleableUri> newUris)
Frontier. It is like calling
addNewUri(CrawleableUri) with every single URI.newUris - the URIs that should be added to the Frontiervoid crawlingDone(List<CrawleableUri> uris)
getNextUris() method and the crawling has been
finished. Internally, the Frontier marks the URIs as crawled and
adds the new URIs using the addNewUris(List) method.uris - crawled URIsint getNumberOfPendingUris()
getNextUris() and have not been marked as
crawled using Frontier#crawlingDone(Map).boolean doesRecrawling()
Copyright © 2017–2019. All rights reserved.