-
- 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 BooleanisActiveprivate final Integeridprivate final ImmutableConfigunmodifiedConfigprivate final ChainedUrlNormalizerurlNormalizersprivate final WebDbwebDbprivate final GlobalCacheFactoryglobalCacheFactoryprivate final InjectComponentinjectComponentprivate final BatchFetchComponentfetchComponentprivate final ParseComponentparseComponentprivate final UpdateComponentupdateComponentprivate final LoadComponentloadComponentprivate final GlobalCacheglobalCacheprivate final UrlPoolcrawlPoolprivate final CrawlLoopscrawlLoopsprivate final LongstartTimeprivate final ConcurrentSkipListMap<Integer, PulsarSession>sessionsprivate final AbstractApplicationContextapplicationContextprivate final PulsarEnvironmentpulsarEnvironment
-
Constructor Summary
Constructors Constructor Description BasicPulsarContext(AbstractApplicationContext applicationContext)
-
Method Summary
Modifier and Type Method Description BooleangetIsActive()IntegergetId()The context id ImmutableConfiggetUnmodifiedConfig()ChainedUrlNormalizergetUrlNormalizers()WebDbgetWebDb()GlobalCacheFactorygetGlobalCacheFactory()InjectComponentgetInjectComponent()BatchFetchComponentgetFetchComponent()ParseComponentgetParseComponent()UpdateComponentgetUpdateComponent()LoadComponentgetLoadComponent()GlobalCachegetGlobalCache()UrlPoolgetCrawlPool()CrawlLoopsgetCrawlLoops()final LonggetStartTime()The start time final ConcurrentSkipListMap<Integer, PulsarSession>getSessions()All open sessions final AbstractApplicationContextgetApplicationContext()final PulsarEnvironmentgetPulsarEnvironment()BasicPulsarSessioncreateSession()Create a session -
Methods inherited from class ai.platon.pulsar.context.support.BasicPulsarContext
await, 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
-
getIsActive
Boolean getIsActive()
-
getUnmodifiedConfig
ImmutableConfig getUnmodifiedConfig()
-
getUrlNormalizers
ChainedUrlNormalizer getUrlNormalizers()
-
getWebDb
WebDb getWebDb()
-
getGlobalCacheFactory
GlobalCacheFactory getGlobalCacheFactory()
-
getInjectComponent
InjectComponent getInjectComponent()
-
getFetchComponent
BatchFetchComponent getFetchComponent()
-
getParseComponent
ParseComponent getParseComponent()
-
getUpdateComponent
UpdateComponent getUpdateComponent()
-
getLoadComponent
LoadComponent getLoadComponent()
-
getGlobalCache
GlobalCache getGlobalCache()
-
getCrawlPool
UrlPool getCrawlPool()
-
getCrawlLoops
CrawlLoops getCrawlLoops()
-
getStartTime
final Long getStartTime()
The start time
-
getSessions
final ConcurrentSkipListMap<Integer, PulsarSession> getSessions()
All open sessions
-
getApplicationContext
final AbstractApplicationContext getApplicationContext()
-
getPulsarEnvironment
final PulsarEnvironment getPulsarEnvironment()
-
createSession
BasicPulsarSession createSession()
Create a session
-
-
-
-