public abstract class AbstractKnownUriFilterDecorator extends Object implements KnownUriFilterDecorator
| Modifier and Type | Field and Description |
|---|---|
protected KnownUriFilter |
decorated |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractKnownUriFilterDecorator() |
|
AbstractKnownUriFilterDecorator(KnownUriFilter decorated) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(CrawleableUri uri,
long nextCrawlTimestamp)
Adds the given URI to the list of already known URIs.
|
void |
add(CrawleableUri uri,
long lastCrawlTimestamp,
long nextCrawlTimestamp)
Adds the given URI to the list of already known URIs together with the the time at which it has been crawled.
|
void |
close() |
long |
count()
count the numbers of known URIs
|
KnownUriFilter |
getDecorated() |
List<CrawleableUri> |
getOutdatedUris()
Returns all
CrawleableUris which have to be recrawled. |
boolean |
isUriGood(CrawleableUri uri)
Returns true if the given
CrawleableUri object fulfills the
requirements imposed by this filter. |
protected KnownUriFilter decorated
protected AbstractKnownUriFilterDecorator()
public AbstractKnownUriFilterDecorator(KnownUriFilter decorated)
public void add(CrawleableUri uri, long nextCrawlTimestamp)
KnownUriFilterKnownUriFilter.add(CrawleableUri, long) with the current system time.add in interface KnownUriFilteruri - the URI that should be added to the list.nextCrawlTimestamp - The time at which the given URI should be crawled next.public void add(CrawleableUri uri, long lastCrawlTimestamp, long nextCrawlTimestamp)
KnownUriFilteradd in interface KnownUriFilteruri - the URI that should be added to the list.lastCrawlTimestamp - the time at which the given URI has eben crawled.nextCrawlTimestamp - The time at which the given URI should be crawled next.public List<CrawleableUri> getOutdatedUris()
KnownUriFilterCrawleableUris which have to be recrawled. This means their time to next crawl has passed.getOutdatedUris in interface KnownUriFilterCrawleableUris.public long count()
KnownUriFiltercount in interface KnownUriFilterpublic boolean isUriGood(CrawleableUri uri)
UriFilterCrawleableUri object fulfills the
requirements imposed by this filter.isUriGood in interface UriFilteruri - the CrawleableUri object that is checkedCrawleableUri object fulfills the
requirements imposed by this filter. Otherwise false is returned.public KnownUriFilter getDecorated()
getDecorated in interface KnownUriFilterDecoratorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017–2019. All rights reserved.