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 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 interface org.archive.spring.HasKeyedProperties
    • getForceQueueAssignment

      public String getForceQueueAssignment()
    • setForceQueueAssignment

      public void setForceQueueAssignment(String forceQueueAssignment)
      queue assignment to force onto CrawlURIs; intended to be overridden
    • getClassKey

      public abstract String getClassKey(CrawlURI cauri)
      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.