Class ConcurrentStatefulPrivacyContextPool
-
- All Implemented Interfaces:
public final class ConcurrentStatefulPrivacyContextPool
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<PrivacyAgent, PrivacyContext>permanentContextsprivate final Map<PrivacyAgent, PrivacyContext>temporaryContextsprivate final Deque<PrivacyContext>zombieContextsprivate final Deque<PrivacyContext>deadContextsprivate final Map<PrivacyAgent, PrivacyContext>activeContextsprivate final IntegeractiveContextCountprivate final ProxyPoolManagerproxyPoolManagerprivate final WebDriverPoolManagerdriverPoolManagerprivate final CoreMetricscoreMetricsprivate final ImmutableConfigconfprivate final IntegerallowedPrivacyContextCount
-
Constructor Summary
Constructors Constructor Description ConcurrentStatefulPrivacyContextPool(ProxyPoolManager proxyPoolManager, WebDriverPoolManager driverPoolManager, CoreMetrics coreMetrics, ImmutableConfig conf, Integer allowedPrivacyContextCount)
-
Method Summary
Modifier and Type Method Description final Map<PrivacyAgent, PrivacyContext>getPermanentContexts()final Map<PrivacyAgent, PrivacyContext>getTemporaryContexts()final Deque<PrivacyContext>getZombieContexts()final Deque<PrivacyContext>getDeadContexts()final Map<PrivacyAgent, PrivacyContext>getActiveContexts()final IntegergetActiveContextCount()final ProxyPoolManagergetProxyPoolManager()final WebDriverPoolManagergetDriverPoolManager()final CoreMetricsgetCoreMetrics()final ImmutableConfiggetConf()final IntegergetAllowedPrivacyContextCount()final PrivacyContextcomputeIfAbsent(PrivacyAgent privacyAgent)final BrowserPrivacyContextcreateUnmanagedContext(PrivacyAgent privacyAgent)Create a privacy context who is not added to the context list yet. final UnitcloseDyingContexts()Close the zombie contexts, and the resources release immediately. final Unitclose(PrivacyContext privacyContext)-
-
Constructor Detail
-
ConcurrentStatefulPrivacyContextPool
ConcurrentStatefulPrivacyContextPool(ProxyPoolManager proxyPoolManager, WebDriverPoolManager driverPoolManager, CoreMetrics coreMetrics, ImmutableConfig conf, Integer allowedPrivacyContextCount)
-
-
Method Detail
-
getPermanentContexts
final Map<PrivacyAgent, PrivacyContext> getPermanentContexts()
-
getTemporaryContexts
final Map<PrivacyAgent, PrivacyContext> getTemporaryContexts()
-
getZombieContexts
final Deque<PrivacyContext> getZombieContexts()
-
getDeadContexts
final Deque<PrivacyContext> getDeadContexts()
-
getActiveContexts
@Synchronized() final Map<PrivacyAgent, PrivacyContext> getActiveContexts()
-
getActiveContextCount
@Synchronized() final Integer getActiveContextCount()
-
getProxyPoolManager
final ProxyPoolManager getProxyPoolManager()
-
getDriverPoolManager
final WebDriverPoolManager getDriverPoolManager()
-
getCoreMetrics
final CoreMetrics getCoreMetrics()
-
getConf
final ImmutableConfig getConf()
-
getAllowedPrivacyContextCount
final Integer getAllowedPrivacyContextCount()
-
computeIfAbsent
final PrivacyContext computeIfAbsent(PrivacyAgent privacyAgent)
-
createUnmanagedContext
final BrowserPrivacyContext createUnmanagedContext(PrivacyAgent privacyAgent)
Create a privacy context who is not added to the context list yet.
-
closeDyingContexts
@Synchronized() final Unit closeDyingContexts()
Close the zombie contexts, and the resources release immediately.
-
close
@Synchronized() final Unit close(PrivacyContext privacyContext)
-
-
-
-