public class PluggableCrawlManager
extends org.lockss.app.BaseLockssDaemonManager
implements org.lockss.app.ConfigurableManager
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_CRAWLER_ID
The constant CRAWLER_ID.
|
static String |
ATTR_CRAWLER_NAME
The constant CRAWLER_NAME.
|
static String |
ATTR_CRAWLING_ENABLED
The constant CRAWLING_ENABLED.
|
static String |
ATTR_STARTER_ENABLED
The constant CRAWL_STARTER_ENABLED.
|
static String |
CRAWLER_IDS
The constant CRAWLER_IDS.
|
static String |
CRAWLER_PREFIX |
static String |
DB_FILENAME
The constant DB_FILENAME.
|
static String |
DEFAULT_CRAWL_DB_PATH
The constant DEFAULT_CRAWL_DB_PATH.
|
static boolean |
DEFAULT_REQUEUE_ON_RESTART |
static List<String> |
defaultCrawlerIds
The default list of known crawlers.
|
static String |
ENABLED
The constant ENABLED.
|
static String |
PARAM_CRAWL_DB_PATH
The constant PARAM_CRAWL_DB_PATH.
|
static String |
PARAM_REQUEUE_ON_RESTART |
static String |
PREFIX
The constant PREFIX.
|
| Constructor and Description |
|---|
PluggableCrawlManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCrawlJob(org.lockss.util.rest.crawler.CrawlJob crawlJob)
Insert crawl Job into persistent store.
|
void |
deleteAllCrawls()
Delete all crawls.
|
long |
getConnectTimeout() |
PluggableCrawler |
getCrawler(String crawlerId)
Gets crawler.
|
CrawlerConfig |
getCrawlerConfig(String crawlerId)
Gets crawler config.
|
List<String> |
getCrawlerIds()
Gets crawler ids.
|
org.lockss.util.rest.crawler.CrawlJob |
getCrawlJob(String jobId)
Gets crawl status.
|
org.dizitart.no2.objects.Cursor<org.lockss.util.rest.crawler.CrawlJob> |
getCrawlJobsWithAuId(String auId)
Gets crawl jobs with au id.
|
long |
getFetchDelay() |
int |
getMaxRetries() |
long |
getReadTimeout() |
long |
getRetryDelay() |
void |
handleCrawlComplete(org.lockss.crawler.CrawlerStatus status)
handle the complete crawl.
|
void |
handleCrawlComplete(org.lockss.crawler.CrawlEvent event)
handle the complete crawl.
|
boolean |
isCrawlerEnabled()
is crawling enabled
|
boolean |
isCrawlerEnabled(String crawlerId)
Is a specific crawler enabled
|
boolean |
isCrawlStarterEnabled()
is the crawl starter enabled
|
boolean |
isEligibleForCrawl(String auId)
Is eligible Au elgible for crawl boolean.
|
void |
markInterruptedCrawls() |
void |
restartCrawls()
restart unfinished crawls.
|
void |
setConfig(org.lockss.config.Configuration newConfig,
org.lockss.config.Configuration prevConfig,
org.lockss.config.Configuration.Differences changedKeys) |
void |
startService() |
void |
stopService() |
void |
updateCrawlJob(org.lockss.util.rest.crawler.CrawlJob crawlJob)
Update a crawl Jobs status.
|
getDaemon, initService, initService, isDaemonInitedgetAlertManager, getApp, getClassName, getConfigManager, getDefaultTempRootDirectory, getJMSManager, getManagerByType, isAppInited, isInited, isRepoReady, isShuttingDown, isStarted, receiveMessage, resetConfig, serviceStarted, setUpJmsReceive, setUpJmsReceive, setUpJmsSend, stopJms, waitForRepo, waitForRepo, waitStarted, waitStartedpublic static final String PREFIX
public static final String CRAWLER_PREFIX
public static final String PARAM_CRAWL_DB_PATH
public static final String DEFAULT_CRAWL_DB_PATH
public static final String PARAM_REQUEUE_ON_RESTART
public static boolean DEFAULT_REQUEUE_ON_RESTART
public static final String DB_FILENAME
public static final String CRAWLER_IDS
public static final List<String> defaultCrawlerIds
public static final String ATTR_CRAWLER_ID
public static final String ATTR_CRAWLER_NAME
public static final String ATTR_CRAWLING_ENABLED
public static final String ATTR_STARTER_ENABLED
public static final String ENABLED
public void startService()
startService in interface org.lockss.app.LockssManagerstartService in class org.lockss.app.BaseLockssManagerpublic void stopService()
stopService in interface org.lockss.app.LockssManagerstopService in class org.lockss.app.BaseLockssManagerpublic void setConfig(org.lockss.config.Configuration newConfig,
org.lockss.config.Configuration prevConfig,
org.lockss.config.Configuration.Differences changedKeys)
setConfig in interface org.lockss.app.ConfigurableManagerpublic int getMaxRetries()
public long getRetryDelay()
public long getConnectTimeout()
public long getReadTimeout()
public long getFetchDelay()
public boolean isEligibleForCrawl(String auId)
auId - the au idpublic boolean isCrawlerEnabled()
public boolean isCrawlStarterEnabled()
public org.lockss.util.rest.crawler.CrawlJob getCrawlJob(String jobId)
jobId - the idpublic org.dizitart.no2.objects.Cursor<org.lockss.util.rest.crawler.CrawlJob> getCrawlJobsWithAuId(String auId)
auId - the au idpublic void addCrawlJob(org.lockss.util.rest.crawler.CrawlJob crawlJob)
crawlJob - the crawl job.public void updateCrawlJob(org.lockss.util.rest.crawler.CrawlJob crawlJob)
crawlJob - the crawl job.public void restartCrawls()
public void markInterruptedCrawls()
public void deleteAllCrawls()
public CrawlerConfig getCrawlerConfig(String crawlerId)
crawlerId - the crawler idpublic PluggableCrawler getCrawler(String crawlerId)
crawlerId - the crawler idpublic boolean isCrawlerEnabled(String crawlerId)
crawlerId - the id of the crawlerpublic void handleCrawlComplete(org.lockss.crawler.CrawlEvent event)
event - the crawl complete event.public void handleCrawlComplete(org.lockss.crawler.CrawlerStatus status)
status - the status of the completed crawl.Copyright © 2000–2023 LOCKSS Program. All rights reserved.