|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.crawler.util.SetBasedUriUniqFilter
public abstract class SetBasedUriUniqFilter
UriUniqFilter based on an underlying UriSet (essentially a Set).
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.archive.crawler.datamodel.UriUniqFilter |
---|
UriUniqFilter.HasUriReceiver |
Field Summary | |
---|---|
protected long |
duplicateCount
|
protected long |
duplicatesAtLastSample
|
protected java.io.PrintWriter |
profileLog
|
protected UriUniqFilter.HasUriReceiver |
receiver
|
Constructor Summary | |
---|---|
SetBasedUriUniqFilter()
|
Method Summary | |
---|---|
void |
add(java.lang.String key,
CandidateURI value)
Add given uri, if not already present. |
void |
addForce(java.lang.String key,
CandidateURI value)
Add given uri, all the way through to underlying destination, even if already present. |
void |
addNow(java.lang.String key,
CandidateURI value)
Immediately add uri. |
void |
close()
Close down any allocated resources. |
long |
count()
|
void |
forget(java.lang.String key,
CandidateURI value)
Forget item was seen |
void |
note(java.lang.String key)
Note item as seen, without passing through to receiver. |
long |
pending()
Count of items added, but not yet filtered in or out. |
protected void |
profileLog(java.lang.String key)
|
long |
requestFlush()
Request that any pending items be added/dropped. |
protected abstract boolean |
setAdd(java.lang.CharSequence key)
|
protected abstract long |
setCount()
|
void |
setDestination(UriUniqFilter.HasUriReceiver receiver)
Receiver of uniq URIs. |
void |
setProfileLog(java.io.File logfile)
Set a File to receive a log for replay profiling. |
protected abstract boolean |
setRemove(java.lang.CharSequence key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected UriUniqFilter.HasUriReceiver receiver
protected java.io.PrintWriter profileLog
protected long duplicateCount
protected long duplicatesAtLastSample
Constructor Detail |
---|
public SetBasedUriUniqFilter()
Method Detail |
---|
protected abstract boolean setAdd(java.lang.CharSequence key)
protected abstract boolean setRemove(java.lang.CharSequence key)
protected abstract long setCount()
public long count()
count
in interface UriUniqFilter
public long pending()
UriUniqFilter
pending
in interface UriUniqFilter
public void setDestination(UriUniqFilter.HasUriReceiver receiver)
UriUniqFilter
setDestination
in interface UriUniqFilter
receiver
- Object that will be passed items. Must implement
HasUriReceiver interface.protected void profileLog(java.lang.String key)
public void add(java.lang.String key, CandidateURI value)
UriUniqFilter
add
in interface UriUniqFilter
key
- Usually a canonicalized version of value
.
This is the key used doing lookups, forgets and insertions on the
already included list.value
- item to add.public void addNow(java.lang.String key, CandidateURI value)
UriUniqFilter
addNow
in interface UriUniqFilter
key
- Usually a canonicalized version of uri
.
This is the key used doing lookups, forgets and insertions on the
already included list.value
- item to add.public void addForce(java.lang.String key, CandidateURI value)
UriUniqFilter
addForce
in interface UriUniqFilter
key
- Usually a canonicalized version of uri
.
This is the key used doing lookups, forgets and insertions on the
already included list.value
- item to add.public void note(java.lang.String key)
UriUniqFilter
note
in interface UriUniqFilter
key
- Usually a canonicalized version of an URI
.
This is the key used doing lookups, forgets and insertions on the
already included list.public void forget(java.lang.String key, CandidateURI value)
UriUniqFilter
forget
in interface UriUniqFilter
key
- Usually a canonicalized version of an URI
.
This is the key used doing lookups, forgets and insertions on the
already included list.value
- item to add.public long requestFlush()
UriUniqFilter
requestFlush
in interface UriUniqFilter
public void close()
UriUniqFilter
close
in interface UriUniqFilter
public void setProfileLog(java.io.File logfile)
UriUniqFilter
setProfileLog
in interface UriUniqFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |