Class PluggableCrawl
java.lang.Object
org.lockss.laaws.crawler.impl.pluggable.PluggableCrawl
- Direct Known Subclasses:
CmdLineCrawl
Basic Pluggable crawl - extend to provide functionality for a specific crawler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA wrapper around a Rest CrawlStatus that can be used inside the daemon code. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.lockss.plugin.ArchivalUnitprotected final org.lockss.util.rest.crawler.CrawlDescDescription of the crawl requested.protected final CrawlerConfigThe configuration of the crawler when this crawl began.protected org.lockss.crawler.CrawlerStatusThe current status of a crawl as understood by the internal LOCKSS crawler.protected final org.lockss.util.rest.crawler.CrawlJobThe job for this crawl. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPluggableCrawl(CrawlerConfig crawlerConfig, org.lockss.plugin.ArchivalUnit au, org.lockss.util.rest.crawler.CrawlJob crawlJob) Instantiates a new Pluggable crawl. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGenerate key string.org.lockss.plugin.ArchivalUnitgetAu()getAuId()Gets au id.org.lockss.util.rest.crawler.CrawlDescGets crawl desc.Gets crawler config.Gets crawler id.org.lockss.crawler.CrawlerStatusProvides the crawler status.Gets crawl key.Gets crawl kind.Gets crawl status.org.lockss.util.rest.crawler.JobStatusGets job status.protected voidsetCrawlerStatus(org.lockss.crawler.CrawlerStatus crawlerStatus) Saves the crawler status.abstract org.lockss.crawler.CrawlerStatusEnqueue a crawl request.abstract org.lockss.crawler.CrawlerStatusStop crawl crawler status.
-
Field Details
-
crawlJob
protected final org.lockss.util.rest.crawler.CrawlJob crawlJobThe job for this crawl. -
crawlDesc
protected final org.lockss.util.rest.crawler.CrawlDesc crawlDescDescription of the crawl requested. -
crawlerConfig
The configuration of the crawler when this crawl began. This is stored so that a crawl will run with the parameters it was enqueued with. -
crawlerStatus
protected org.lockss.crawler.CrawlerStatus crawlerStatusThe current status of a crawl as understood by the internal LOCKSS crawler. -
au
protected org.lockss.plugin.ArchivalUnit au
-
-
Constructor Details
-
PluggableCrawl
protected PluggableCrawl(CrawlerConfig crawlerConfig, org.lockss.plugin.ArchivalUnit au, org.lockss.util.rest.crawler.CrawlJob crawlJob) Instantiates a new Pluggable crawl. This will initialize the basic structures the concrete implementations of this- Parameters:
crawlerConfig- the crawler configcrawlJob- the crawl job
-
-
Method Details
-
getCrawlerStatus
public org.lockss.crawler.CrawlerStatus getCrawlerStatus()Provides the crawler status.- Returns:
- a CrawlerStatus with the crawler status.
-
setCrawlerStatus
protected void setCrawlerStatus(org.lockss.crawler.CrawlerStatus crawlerStatus) Saves the crawler status.- Parameters:
crawlerStatus- A CrawlerStatus with the crawler status.
-
getCrawlStatus
Gets crawl status.- Returns:
- the crawl status
-
getAuId
Gets au id.- Returns:
- the au id
-
getCrawlerId
Gets crawler id.- Returns:
- the crawler id
-
getCrawlDesc
public org.lockss.util.rest.crawler.CrawlDesc getCrawlDesc()Gets crawl desc.- Returns:
- the crawl desc
-
getAu
public org.lockss.plugin.ArchivalUnit getAu() -
getCrawlerConfig
Gets crawler config.- Returns:
- the crawler config
-
getCrawlKey
Gets crawl key.- Returns:
- the crawl key
-
getCrawlKind
Gets crawl kind.- Returns:
- the crawl kind
-
startCrawl
public abstract org.lockss.crawler.CrawlerStatus startCrawl()Enqueue a crawl request.- Returns:
- the crawler status
-
stopCrawl
public abstract org.lockss.crawler.CrawlerStatus stopCrawl()Stop crawl crawler status.- Returns:
- the crawler status
-
generateKey
Generate key string.- Returns:
- the string
-
getJobStatus
public org.lockss.util.rest.crawler.JobStatus getJobStatus()Gets job status.- Returns:
- the job status
-