|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UriUniqFilter
A UriUniqFilter passes URI objects to a destination (receiver) if the passed URI object has not been previously seen. If already seen, the passed URI object is dropped.
For efficiency in comparison against a large history of seen URIs, URI objects may not be passed immediately, unless the addNow() is used or a flush() is forced.
| Nested Class Summary | |
|---|---|
static interface |
UriUniqFilter.HasUriReceiver
URIs that have not been seen before 'visit' this 'Visitor'. |
| 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. |
long |
requestFlush()
Request that any pending items be added/dropped. |
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. |
| Method Detail |
|---|
long count()
long pending()
void setDestination(UriUniqFilter.HasUriReceiver receiver)
receiver - Object that will be passed items. Must implement
HasUriReceiver interface.
void add(java.lang.String key,
CandidateURI value)
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.
void addNow(java.lang.String key,
CandidateURI value)
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.
void addForce(java.lang.String key,
CandidateURI value)
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.void note(java.lang.String key)
key - Usually a canonicalized version of an URI.
This is the key used doing lookups, forgets and insertions on the
already included list.
void forget(java.lang.String key,
CandidateURI value)
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.long requestFlush()
void close()
void setProfileLog(java.io.File logfile)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||