java.lang.Objectorg.supermind.crawl.LastModifiedFetchedURLs
public class LastModifiedFetchedURLs
Records URLs and their last modified times.
Field Summary |
---|
Fields inherited from interface org.supermind.crawl.FetchedURLs |
---|
LOG |
Fields inherited from interface org.supermind.crawl.LastModifiedDB |
---|
NO_OP |
Constructor Summary | |
---|---|
LastModifiedFetchedURLs()
|
Method Summary | |
---|---|
void |
close()
Close. |
boolean |
contains(java.net.URL url)
Has this URL already been fetched? |
ScheduledURL |
get(long id)
Get a persisted URL. |
protected long |
getChecksum(java.net.URL url)
Create a 64-bit checksum by merging a 32-bit host checksum with the url's 32-bit checksum. |
long |
getLastModified(java.net.URL url)
Get last modified time (in milliseconds). |
void |
init()
|
void |
insert(ScheduledURL url,
org.apache.nutch.protocol.ProtocolOutput output)
Insert a fetched URL. |
void |
setChecksum(java.util.zip.Checksum checksum)
|
void |
setPersister(LongLongPersister persister)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LastModifiedFetchedURLs()
Method Detail |
---|
public void close() throws java.io.IOException
LastModifiedDB
close
in interface FetchedURLs
close
in interface LastModifiedDB
java.io.IOException
public boolean contains(java.net.URL url)
contains
in interface FetchedURLs
url
-
public ScheduledURL get(long id)
FetchedURLs
get
in interface FetchedURLs
id
- ScheduledURL's id
protected long getChecksum(java.net.URL url)
url
-
public long getLastModified(java.net.URL url)
LastModifiedDB
getLastModified
in interface LastModifiedDB
public void init() throws java.io.IOException
init
in interface FetchedURLs
java.io.IOException
public void insert(ScheduledURL url, org.apache.nutch.protocol.ProtocolOutput output) throws java.io.IOException
FetchedURLs
insert
in interface FetchedURLs
url
- urloutput
- protocol output
java.io.IOException
public void setChecksum(java.util.zip.Checksum checksum)
public void setPersister(LongLongPersister persister)