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 BooleanisActiveprivate final BooleanisClosedprivate final ConcurrentHashMap<PrivacyAgent, PrivacyContext>permanentContextsprivate final PrivacyContextIdGeneratorprivacyContextIdGeneratorprivate 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 id)-
Methods inherited from class ai.platon.pulsar.crawl.fetch.privacy.PrivacyManager
close, close, getActiveContexts, getConf, getContextLifeCycleMonitor, getPermanentContexts, getPrivacyContextIdGenerator, 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
@Deprecated(message = "Use computeNextContext(task, fingerprint)", replaceWith = @ReplaceWith(imports = {}, expression = "computeNextContext(FetchTask, Fingerprint)")) PrivacyContext computeNextContext(Fingerprint fingerprint)
-
computeNextContext
PrivacyContext computeNextContext(WebPage page, Fingerprint fingerprint, FetchTask task)
-
computeIfNecessary
@Deprecated(message = "Use computeIfNecessary(task, fingerprint)", replaceWith = @ReplaceWith(imports = {}, expression = "computeIfNecessary(FetchTask, Fingerprint)")) PrivacyContext computeIfNecessary(Fingerprint fingerprint)
-
computeIfNecessary
PrivacyContext computeIfNecessary(WebPage page, Fingerprint fingerprint, FetchTask task)
-
computeIfAbsent
PrivacyContext computeIfAbsent(PrivacyAgent id)
-
-
-
-