Class PluggableCrawlManager

java.lang.Object
org.lockss.app.BaseLockssManager
org.lockss.app.BaseLockssDaemonManager
org.lockss.laaws.crawler.impl.PluggableCrawlManager
All Implemented Interfaces:
org.lockss.app.ConfigurableManager, org.lockss.app.LockssManager

public class PluggableCrawlManager extends org.lockss.app.BaseLockssDaemonManager implements org.lockss.app.ConfigurableManager
The type Pluggable crawl manager.
  • Field Details

  • Constructor Details

    • PluggableCrawlManager

      public PluggableCrawlManager()
  • Method Details

    • startService

      public void startService()
      Specified by:
      startService in interface org.lockss.app.LockssManager
      Overrides:
      startService in class org.lockss.app.BaseLockssManager
    • stopService

      public void stopService()
      Specified by:
      stopService in interface org.lockss.app.LockssManager
      Overrides:
      stopService in class org.lockss.app.BaseLockssManager
    • setConfig

      public void setConfig(org.lockss.config.Configuration newConfig, org.lockss.config.Configuration prevConfig, org.lockss.config.Configuration.Differences changedKeys)
      Specified by:
      setConfig in interface org.lockss.app.ConfigurableManager
    • getMaxRetries

      public int getMaxRetries()
    • getRetryDelay

      public long getRetryDelay()
    • getConnectTimeout

      public long getConnectTimeout()
    • getReadTimeout

      public long getReadTimeout()
    • getFetchDelay

      public long getFetchDelay()
    • getCrawlerIds

      public List<String> getCrawlerIds()
      Gets crawler ids.
      Returns:
      the crawler ids
    • isEligibleForCrawl

      public boolean isEligibleForCrawl(String auId)
      Is eligible Au elgible for crawl boolean.
      Parameters:
      auId - the au id
      Returns:
      the boolean
    • isCrawlerEnabled

      public boolean isCrawlerEnabled()
      is crawling enabled
      Returns:
      true iff crawler (global is enabled)
    • isCrawlStarterEnabled

      public boolean isCrawlStarterEnabled()
      is the crawl starter enabled
      Returns:
      boolean are crawls allowed to start
    • getCrawlJob

      public org.lockss.util.rest.crawler.CrawlJob getCrawlJob(String jobId)
      Gets crawl status.
      Parameters:
      jobId - the id
      Returns:
      the crawl status
    • getCrawlJobsWithAuId

      public org.dizitart.no2.objects.Cursor<org.lockss.util.rest.crawler.CrawlJob> getCrawlJobsWithAuId(String auId)
      Gets crawl jobs with au id.
      Parameters:
      auId - the au id
      Returns:
      the crawl jobs with au id
    • addCrawlJob

      public void addCrawlJob(org.lockss.util.rest.crawler.CrawlJob crawlJob)
      Insert crawl Job into persistent store. throws if crawl job already exists.
      Parameters:
      crawlJob - the crawl job.
    • updateCrawlJob

      public void updateCrawlJob(org.lockss.util.rest.crawler.CrawlJob crawlJob)
      Update a crawl Jobs status. throws if crawl job does not exist.
      Parameters:
      crawlJob - the crawl job.
    • restartCrawls

      public void restartCrawls()
      restart unfinished crawls.
    • markInterruptedCrawls

      public void markInterruptedCrawls()
    • deleteAllCrawls

      public void deleteAllCrawls()
      Delete all crawls.
    • getCrawlerConfig

      public CrawlerConfig getCrawlerConfig(String crawlerId)
      Gets crawler config.
      Parameters:
      crawlerId - the crawler id
      Returns:
      the crawler config
    • getCrawler

      public PluggableCrawler getCrawler(String crawlerId)
      Gets crawler.
      Parameters:
      crawlerId - the crawler id
      Returns:
      the crawler
    • isCrawlerEnabled

      public boolean isCrawlerEnabled(String crawlerId)
      Is a specific crawler enabled
      Parameters:
      crawlerId - the id of the crawler
      Returns:
      true if the crawler is found in the configuration map and is marked enabled.
    • handleCrawlComplete

      public void handleCrawlComplete(org.lockss.crawler.CrawlEvent event)
      handle the complete crawl.
      Parameters:
      event - the crawl complete event.
    • handleCrawlComplete

      public void handleCrawlComplete(org.lockss.crawler.CrawlerStatus status)
      handle the complete crawl.
      Parameters:
      status - the status of the completed crawl.