|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface URIWorkQueue
A single queue of related URIs to visit. Typically grouped by hostname:port.
| Field Summary | |
|---|---|
static java.lang.Object |
BUSY
BUSY: on hold until one or more URIs in progress are finished |
static java.lang.Object |
DISCARDED
DISCARDED: discarded because empty (not irreversible) |
static java.lang.Object |
EMPTY
EMPTY: eligible to supply URIs, but without any to supply |
static java.lang.Object |
FROZEN
FROZEN: not considered as URI source until operator intervention |
static java.lang.Object |
INACTIVE
INACTIVE: not considered as URI source until activated by policy |
static java.lang.Object |
READY
READY: eligible and able to supply a new work URI on demand |
static java.lang.Object |
SNOOZED
SNOOZED: on hold until a specific time interval has passed |
| Method Summary | |
|---|---|
void |
activate()
Move queue from INACTIVE to ACTIVE state |
boolean |
checkEmpty()
Update READY/EMPTY state after preceding queue edit operations. |
void |
deactivate()
Move queue from READY or EMPTY state to INACTIVE |
long |
deleteMatchedItems(org.apache.commons.collections.Predicate matcher)
Delete items matching the supplied criterion. |
CrawlURI |
dequeue()
Remove an item in the default manner |
void |
discard()
Move queue from READY or EMPTY to DISCARDED |
void |
enqueue(CrawlURI curi)
Add an item in the default manner |
void |
freeze()
Move queue from READY or EMPTY state to FROZEN |
java.lang.String |
getClassKey()
The 'classKey' identifier common to items in this queue |
java.util.List |
getInProcessItems()
|
java.util.Iterator |
getIterator(boolean inCacheOnly)
Iterate over all available (non-frozen) items. |
java.lang.String |
getLastDequeued()
|
java.lang.String |
getLastQueued()
|
java.lang.String |
getSortFallback()
To ensure total and consistent ordering when in scheduled order, a fallback sort criterion |
java.lang.Object |
getState()
|
long |
getWakeTime()
|
boolean |
isDiscardable()
May this KeyedQueue be completely discarded. |
boolean |
isEmpty()
|
long |
length()
|
void |
noteInProcess(CrawlURI o)
Note that the given item is 'in process'; move queue from READY or EMPTY to BUSY if appropriate and remember in-process item. |
void |
noteProcessDone(CrawlURI o)
Note that the given item's processing has completed; forget the in-process item and move queue from BUSY to READY or EMPTY state if appropriate |
void |
setValence(int v)
Set 'valence', the number of simultaneous items to allow in process before becoming BUSY |
void |
setWakeTime(long w)
|
void |
snooze()
Move queue from READY or EMPTY state to SNOOZED |
void |
unfreeze()
Move queue from FROZEN state to INACTIVE |
void |
wake()
Move queue from SNOOZED state to READY or EMPTY |
| Field Detail |
|---|
static final java.lang.Object INACTIVE
static final java.lang.Object READY
static final java.lang.Object FROZEN
static final java.lang.Object BUSY
static final java.lang.Object SNOOZED
static final java.lang.Object EMPTY
static final java.lang.Object DISCARDED
| Method Detail |
|---|
java.lang.String getClassKey()
java.lang.Object getState()
boolean isEmpty()
long length()
Queue.length()void activate()
void deactivate()
void freeze()
void unfreeze()
void snooze()
void wake()
void discard()
boolean checkEmpty()
void noteInProcess(CrawlURI o)
o - void noteProcessDone(CrawlURI o)
o - java.util.List getInProcessItems()
void setValence(int v)
v - long getWakeTime()
void setWakeTime(long w)
w - time to wake, when snoozedjava.lang.String getSortFallback()
void enqueue(CrawlURI curi)
curi - CrawlURI dequeue()
java.lang.String getLastQueued()
java.lang.String getLastDequeued()
boolean isDiscardable()
java.util.Iterator getIterator(boolean inCacheOnly)
inCacheOnly -
Queue.getIterator(boolean)long deleteMatchedItems(org.apache.commons.collections.Predicate matcher)
matcher -
Queue.deleteMatchedItems(org.apache.commons.collections.Predicate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||