public class DocIDServer extends Configurable
| Modifier and Type | Field and Description |
|---|---|
protected com.sleepycat.je.Database |
docIDsDB |
protected int |
lastDocID |
protected static org.apache.log4j.Logger |
logger |
protected Object |
mutex |
config| Constructor and Description |
|---|
DocIDServer(com.sleepycat.je.Environment env,
CrawlConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUrlAndDocId(String url,
int docId) |
void |
close() |
int |
getDocCount() |
int |
getDocId(String url)
Returns the docid of an already seen url.
|
int |
getNewDocID(String url) |
boolean |
isSeenBefore(String url) |
void |
sync() |
getConfigprotected static final org.apache.log4j.Logger logger
protected com.sleepycat.je.Database docIDsDB
protected final Object mutex
protected int lastDocID
public DocIDServer(com.sleepycat.je.Environment env,
CrawlConfig config)
throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseExceptionpublic int getDocId(String url)
url - the URL for which the docid is returned.public int getNewDocID(String url)
public boolean isSeenBefore(String url)
public int getDocCount()
public void sync()
public void close()
Copyright © 2013. All Rights Reserved.