Class BasicPrivacyContextManager
-
- All Implemented Interfaces:
-
ai.platon.pulsar.protocol.browser.emulator.context.BrowserPrivacyManager,ai.platon.pulsar.skeleton.crawl.fetch.privacy.PrivacyManager,java.lang.AutoCloseable
public final class BasicPrivacyContextManager extends AbstractBrowserPrivacyManager
-
-
Field Summary
Fields Modifier and Type Field Description private final CoreMetricscoreMetricsprivate final WebDriverPoolManagerdriverPoolManagerprivate final ProxyPoolManagerproxyPoolManagerprivate final ImmutableConfigconfprivate final BooleanisActiveprivate final BooleanisClosedprivate final Map<PrivacyAgent, PrivacyContext>activeContextsprivate final ObjectcontextLifeCycleMonitorprivate final ConcurrentLinkedDeque<PrivacyContext>deadContextsprivate final ConcurrentHashMap<PrivacyAgent, PrivacyContext>permanentContextsprivate final PrivacyAgentGeneratorprivacyAgentGeneratorprivate final ConcurrentHashMap<PrivacyAgent, PrivacyContext>temporaryContextsprivate final ConcurrentLinkedDeque<PrivacyContext>zombieContexts
-
Constructor Summary
Constructors Constructor Description BasicPrivacyContextManager(WebDriverPoolManager driverPoolManager, ImmutableConfig config)BasicPrivacyContextManager(WebDriverPoolManager driverPoolManager, ProxyPoolManager proxyPoolManager, CoreMetrics coreMetrics, ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description final CoreMetricsgetCoreMetrics()FetchResultrun(FetchTask task, SuspendFunction2<FetchTask, WebDriver, FetchResult> fetchFun)BrowserPrivacyContextcreateUnmanagedContext(PrivacyAgent privacyAgent)PrivacyContextcomputeNextContext(Fingerprint fingerprint)PrivacyContextcomputeNextContext(WebPage page, Fingerprint fingerprint, FetchTask task)PrivacyContextcomputeIfNecessary(Fingerprint fingerprint)PrivacyContextcomputeIfNecessary(WebPage page, Fingerprint fingerprint, FetchTask task)PrivacyContextcomputeIfAbsent(PrivacyAgent privacyAgent)-
Methods inherited from class ai.platon.pulsar.protocol.browser.emulator.context.AbstractBrowserPrivacyManager
getDriverPoolManager, getProxyPoolManager -
Methods inherited from class ai.platon.pulsar.skeleton.crawl.fetch.privacy.PrivacyManager
close, createUnmanagedContext, getConf, isActive, isClosed, maintain, reset, takeSnapshot -
Methods inherited from class ai.platon.pulsar.skeleton.crawl.fetch.privacy.AbstractPrivacyManager
getActiveContexts, getContextLifeCycleMonitor, getDeadContexts, getPermanentContexts, getPrivacyAgentGenerator, getTemporaryContexts, getZombieContexts -
Methods inherited from class java.lang.AutoCloseable
close -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BasicPrivacyContextManager
BasicPrivacyContextManager(WebDriverPoolManager driverPoolManager, ImmutableConfig config)
-
BasicPrivacyContextManager
BasicPrivacyContextManager(WebDriverPoolManager driverPoolManager, ProxyPoolManager proxyPoolManager, CoreMetrics coreMetrics, ImmutableConfig conf)
-
-
Method Detail
-
getCoreMetrics
final CoreMetrics getCoreMetrics()
-
run
FetchResult run(FetchTask task, SuspendFunction2<FetchTask, WebDriver, FetchResult> fetchFun)
-
createUnmanagedContext
BrowserPrivacyContext createUnmanagedContext(PrivacyAgent privacyAgent)
-
computeNextContext
PrivacyContext computeNextContext(Fingerprint fingerprint)
-
computeNextContext
PrivacyContext computeNextContext(WebPage page, Fingerprint fingerprint, FetchTask task)
-
computeIfNecessary
PrivacyContext computeIfNecessary(Fingerprint fingerprint)
-
computeIfNecessary
PrivacyContext computeIfNecessary(WebPage page, Fingerprint fingerprint, FetchTask task)
-
computeIfAbsent
PrivacyContext computeIfAbsent(PrivacyAgent privacyAgent)
-
-
-
-