Package org.archive.crawler.frontier
Class QueueAssignmentPolicy
java.lang.Object
org.archive.crawler.frontier.QueueAssignmentPolicy
- All Implemented Interfaces:
Serializable
,org.archive.spring.HasKeyedProperties
- Direct Known Subclasses:
BucketQueueAssignmentPolicy
,URIAuthorityBasedQueueAssignmentPolicy
public abstract class QueueAssignmentPolicy
extends Object
implements Serializable, org.archive.spring.HasKeyedProperties
Establishes a mapping from CrawlURIs to String keys (queue names).
- Author:
- gojomo
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
getClassKey
(CrawlURI cauri) Get the String key (name) of the queue to which the CrawlURI should be assigned.org.archive.spring.KeyedProperties
int
Returns the maximum number of different keys this policy can create.void
setForceQueueAssignment
(String forceQueueAssignment) queue assignment to force onto CrawlURIs; intended to be overridden
-
Field Details
-
kp
protected org.archive.spring.KeyedProperties kp
-
-
Constructor Details
-
QueueAssignmentPolicy
public QueueAssignmentPolicy()
-
-
Method Details
-
getKeyedProperties
public org.archive.spring.KeyedProperties getKeyedProperties()- Specified by:
getKeyedProperties
in interfaceorg.archive.spring.HasKeyedProperties
-
getForceQueueAssignment
-
setForceQueueAssignment
queue assignment to force onto CrawlURIs; intended to be overridden -
getClassKey
Get the String key (name) of the queue to which the CrawlURI should be assigned. Note that changes to the CrawlURI, or its associated components (such as CrawlServer), may change its queue assignment.- Parameters:
cauri
- CandidateURI to calculate class key for.- Returns:
- the String key of the queue to assign the CrawlURI
-
maximumNumberOfKeys
public int maximumNumberOfKeys()Returns the maximum number of different keys this policy can create. If there is no maximum, -1 is returned (default).- Returns:
- Maximum number of different keys, or -1 if unbounded.
-