Package com.crawljax.core

Examples of com.crawljax.core.CandidateCrawlAction


   *            the manager that can be used to remove a crawler from the queue.
   * @return the action that needs to be performed by the Crawler.
   */
  public CandidateCrawlAction pollCandidateCrawlAction(Crawler requestingCrawler,
          CrawlQueueManager manager) {
    CandidateCrawlAction action = registerdCandidateActions.remove(requestingCrawler);
    if (action != null) {
      workInProgressCandidateActions.put(requestingCrawler, action);
      return action;
    }
    action = workInProgressCandidateActions.get(requestingCrawler);
View Full Code Here


   * @param newCrawler
   *            the crawler that wants an assignment
   * @return true if the crawler has an assignment false otherwise.
   */
  public boolean registerCrawler(Crawler newCrawler) {
    CandidateCrawlAction action = candidateActions.pollLast();
    if (action == null) {
      return false;
    }
    registeredCrawlers.offerFirst(newCrawler);
    registerdCandidateActions.put(newCrawler, action);
View Full Code Here

   * @param crawler
   *            the crawler to register
   * @return true if the crawler is successfully registered
   */
  public boolean startWorking(Crawler crawler) {
    CandidateCrawlAction action = registerdCandidateActions.remove(crawler);
    registeredCrawlers.remove(crawler);
    if (action == null) {
      return false;
    } else {
      workInProgressCandidateActions.put(crawler, action);
View Full Code Here

TOP

Related Classes of com.crawljax.core.CandidateCrawlAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.