public class BdbWorkQueue extends WorkQueue implements Serializable
active, classKey, costCount, count, enqueueCount, errorCount, expenditureAtLastActivation, isManaged, lastCost, lastDequeueTime, lastPeeked, lastQueued, peekItem, precedenceProvider, retired, sessionBudget, substats, totalBudget, totalExpenditure, wakeTime
Constructor and Description |
---|
BdbWorkQueue(String classKey,
BdbFrontier frontier)
Create a virtual queue inside the given BdbMultipleWorkQueues
|
Modifier and Type | Method and Description |
---|---|
static void |
autoregisterTo(AutoKryo kryo) |
protected void |
deleteItem(WorkQueueFrontier frontier,
CrawlURI peekItem)
Removes the given item from the queue.
|
protected long |
deleteMatchingFromQueue(WorkQueueFrontier frontier,
String match)
Delete URIs matching the given pattern from this queue.
|
protected static String |
getPrefixClassKey(byte[] byteArray) |
protected void |
insertItem(WorkQueueFrontier frontier,
CrawlURI curi,
boolean overwriteIfPresent)
Insert the given curi, whether it is already present or not.
|
protected CrawlURI |
peekItem(WorkQueueFrontier frontier)
Returns first item from queue (does not delete)
|
compareTo, considerActive, deleteMatching, dequeue, enqueue, expend, getClassKey, getCount, getDelay, getKey, getPrecedence, getPrecedenceProvider, getSessionBalance, getSessionBudget, getSubstats, getTotalExpenditure, getWakeTime, isManaged, isOverSessionBudget, isOverTotalBudget, isRetired, makeDirty, noteDeactivated, noteError, noteExhausted, peek, reportTo, setIdentityCache, setPrecedenceProvider, setRetired, setSessionBudget, setTotalBudget, setWakeTime, shortReportLegend, shortReportLine, shortReportLineTo, shortReportMap, tally, toString, unpeek, update
public BdbWorkQueue(String classKey, BdbFrontier frontier)
classKey
- protected long deleteMatchingFromQueue(WorkQueueFrontier frontier, String match) throws IOException
WorkQueue
deleteMatchingFromQueue
in class WorkQueue
frontier
- WorkQueues manager.match
- the pattern to matchIOException
- if there was a problem while deletingprotected void deleteItem(WorkQueueFrontier frontier, CrawlURI peekItem) throws IOException
WorkQueue
deleteItem
in class WorkQueue
frontier
- Work queues manager.IOException
- if there was a problem while deleting the itemprotected CrawlURI peekItem(WorkQueueFrontier frontier) throws IOException
WorkQueue
peekItem
in class WorkQueue
IOException
- if there was a problem while peekingprotected void insertItem(WorkQueueFrontier frontier, CrawlURI curi, boolean overwriteIfPresent) throws IOException
WorkQueue
insertItem
in class WorkQueue
frontier
- WorkQueueFrontier.curi
- CrawlURI to insert.IOException
- if there was a problem while inserting the itemprotected static String getPrefixClassKey(byte[] byteArray)
byteArray
- Byte array to get hex string of.public static void autoregisterTo(AutoKryo kryo)
Copyright © 2003-2014 Internet Archive. All Rights Reserved.