-
- All Implemented Interfaces:
-
ai.platon.pulsar.context.PulsarContext,java.lang.AutoCloseable
public class BasicPulsarContext extends AbstractPulsarContext
The main entry point for pulsar functionality.
A PulsarContext can be used to inject, fetch, load, parse, store Web pages.
-
-
Field Summary
Fields Modifier and Type Field Description private final Integeridprivate final ImmutableConfigunmodifiedConfigprivate final CrawlUrlNormalizersurlNormalizersprivate final WebDbwebDbprivate final GlobalCacheFactoryglobalCacheFactoryprivate final InjectComponentinjectComponentprivate final BatchFetchComponentfetchComponentprivate final ParseComponentparseComponentprivate final UpdateComponentupdateComponentprivate final LoadComponentloadComponentprivate final UrlPoolcrawlPoolprivate final CrawlLoopscrawlLoopsprivate final LongstartTimeprivate final BooleanisActiveprivate final ConcurrentSkipListMap<Integer, PulsarSession>sessionsprivate final AbstractApplicationContextapplicationContextprivate final PulsarEnvironmentpulsarEnvironment
-
Constructor Summary
Constructors Constructor Description BasicPulsarContext(AbstractApplicationContext applicationContext)
-
Method Summary
Modifier and Type Method Description IntegergetId()ImmutableConfiggetUnmodifiedConfig()CrawlUrlNormalizersgetUrlNormalizers()WebDbgetWebDb()GlobalCacheFactorygetGlobalCacheFactory()InjectComponentgetInjectComponent()BatchFetchComponentgetFetchComponent()ParseComponentgetParseComponent()UpdateComponentgetUpdateComponent()LoadComponentgetLoadComponent()UrlPoolgetCrawlPool()CrawlLoopsgetCrawlLoops()final LonggetStartTime()The start time final BooleangetIsActive()final ConcurrentSkipListMap<Integer, PulsarSession>getSessions()All open sessions AbstractApplicationContextgetApplicationContext()PulsarEnvironmentgetPulsarEnvironment()BasicPulsarSessioncreateSession()-
Methods inherited from class ai.platon.pulsar.context.support.BasicPulsarContext
await, clearCaches, close, closeSession, delete, delete, exists, fetchState, flush, get, getBean, getBean, getBeanOrNull, getBeanOrNull, getOrNull, inject, inject, load, load, load, loadAll, loadAll, loadAllAsync, loadAsync, loadDeferred, normalize, normalize, normalize, normalize, normalizeOrNull, normalizeOrNull, parse, persist, registerClosable, registerShutdownHook, scan, scan, scan, submit, submitAll -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getUnmodifiedConfig
ImmutableConfig getUnmodifiedConfig()
-
getUrlNormalizers
CrawlUrlNormalizers getUrlNormalizers()
-
getWebDb
WebDb getWebDb()
-
getGlobalCacheFactory
GlobalCacheFactory getGlobalCacheFactory()
-
getInjectComponent
InjectComponent getInjectComponent()
-
getFetchComponent
BatchFetchComponent getFetchComponent()
-
getParseComponent
ParseComponent getParseComponent()
-
getUpdateComponent
UpdateComponent getUpdateComponent()
-
getLoadComponent
LoadComponent getLoadComponent()
-
getCrawlPool
UrlPool getCrawlPool()
-
getCrawlLoops
CrawlLoops getCrawlLoops()
-
getStartTime
final Long getStartTime()
The start time
-
getIsActive
final Boolean getIsActive()
-
getSessions
final ConcurrentSkipListMap<Integer, PulsarSession> getSessions()
All open sessions
-
getApplicationContext
AbstractApplicationContext getApplicationContext()
-
getPulsarEnvironment
PulsarEnvironment getPulsarEnvironment()
-
createSession
BasicPulsarSession createSession()
-
-
-
-