Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.crawler.frontier
Class QueueAssignmentPolicy

    java.lang.Object
      org.archive.crawler.frontier.QueueAssignmentPolicy

Direct Known Subclasses:
  BucketQueueAssignmentPolicy, HostnameQueueAssignmentPolicy, SurtAuthorityQueueAssignmentPolicy

    public abstract class QueueAssignmentPolicy

extends java.lang.Object

Establishes a mapping from CrawlURIs to String keys (queue names).

Author:
  gojomo

Constructor Summary
`QueueAssignmentPolicy()`

Method Summary
`abstract java.lang.String` | `getClassKey(CrawlController controller, CandidateURI cauri)` Get the String key (name) of the queue to which the CrawlURI should be assigned.
`int` | `maximumNumberOfKeys()` Returns the maximum number of different keys this policy can create.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueueAssignmentPolicy

    public QueueAssignmentPolicy()

Method Detail

### getClassKey

    public abstract java.lang.String getClassKey(CrawlController controller,
                                                 CandidateURI 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:
    `controller` - This crawls' controller.
    `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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Internet Archive. All Rights Reserved.