public abstract class URIAuthorityBasedQueueAssignmentPolicy extends QueueAssignmentPolicy implements HasKeyedProperties
Modifier and Type | Field and Description |
---|---|
protected LongToIntConsistentHash |
conhash |
protected static String |
DEFAULT_CLASS_KEY |
kp
Constructor and Description |
---|
URIAuthorityBasedQueueAssignmentPolicy() |
Modifier and Type | Method and Description |
---|---|
protected String |
bucketBasis(UURI uuri)
Base subqueue on first path-segment, if any.
|
String |
getClassKey(CrawlURI curi)
Get the String key (name) of the queue to which the
CrawlURI should be assigned.
|
protected abstract String |
getCoreKey(UURI basis) |
boolean |
getDeferToPrevious()
Whether to always defer to a previously-assigned key inside
the CrawlURI.
|
int |
getParallelQueues()
The number of parallel queues to split a core key into.
|
protected int |
getSubqueue(UURI basisUuri,
int parallelQueues) |
void |
setDeferToPrevious(boolean defer) |
void |
setParallelQueues(int count) |
getForceQueueAssignment, getKeyedProperties, maximumNumberOfKeys, setForceQueueAssignment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyedProperties
protected static String DEFAULT_CLASS_KEY
protected LongToIntConsistentHash conhash
public URIAuthorityBasedQueueAssignmentPolicy()
public boolean getDeferToPrevious()
public void setDeferToPrevious(boolean defer)
public int getParallelQueues()
public void setParallelQueues(int count)
public String getClassKey(CrawlURI curi)
QueueAssignmentPolicy
getClassKey
in class QueueAssignmentPolicy
curi
- CandidateURI to calculate class key for.protected int getSubqueue(UURI basisUuri, int parallelQueues)
protected String bucketBasis(UURI uuri)
uuri
- Copyright © 2003-2014 Internet Archive. All Rights Reserved.