Class BasicPrivacyContextManager
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public final class BasicPrivacyContextManager extends PrivacyManager
-
-
Field Summary
Fields Modifier and Type Field Description private final WebDriverPoolManagerdriverPoolManagerprivate final ProxyPoolManagerproxyPoolManagerprivate final CoreMetricscoreMetricsprivate final Map<PrivacyAgent, PrivacyContext>activeContextsprivate final ImmutableConfigconfprivate final ObjectcontextLifeCycleMonitorprivate final ConcurrentLinkedDeque<PrivacyContext>deadContextsprivate final BooleanisActiveprivate final BooleanisClosedprivate 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 config)
-
Method Summary
Modifier and Type Method Description final WebDriverPoolManagergetDriverPoolManager()final ProxyPoolManagergetProxyPoolManager()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.crawl.fetch.privacy.PrivacyManager
close, close, getActiveContexts, getConf, getContextLifeCycleMonitor, getDeadContexts, getPermanentContexts, getPrivacyAgentGenerator, getTemporaryContexts, getZombieContexts, isActive, isClosed, maintain, reset, takeSnapshot -
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 config)
-
-
Method Detail
-
getDriverPoolManager
final WebDriverPoolManager getDriverPoolManager()
-
getProxyPoolManager
final ProxyPoolManager getProxyPoolManager()
-
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)
-
-
-
-