-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class ProxyPoolManager implements AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classProxyPoolManager.Companion
-
Field Summary
Fields Modifier and Type Field Description private InstantlastActiveTimeprivate DurationidleTimeoutprivate final DurationidleTimeprivate final BooleanisIdleprivate final AtomicIntegernumRunningTasksprivate StringstatusStringprivate Booleanverboseprivate final ConcurrentSkipListMap<Path, ProxyEntry>activeProxyEntriesprivate final ConcurrentSkipListSet<ProxyEntry>workingProxyEntriesprivate final IntegerlocalPortprivate final ProxyEntrycurrentInterceptProxyEntryprivate final BooleanisEnabledprivate final BooleanisDisabledprivate final BooleanisActiveprivate final ProxyPoolproxyPool
-
Constructor Summary
Constructors Constructor Description ProxyPoolManager(ProxyPool proxyPool, ImmutableConfig conf)
-
Method Summary
-
-
Constructor Detail
-
ProxyPoolManager
ProxyPoolManager(ProxyPool proxyPool, ImmutableConfig conf)
-
-
Method Detail
-
getLastActiveTime
final Instant getLastActiveTime()
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
-
getIdleTimeout
final Duration getIdleTimeout()
-
setIdleTimeout
final Unit setIdleTimeout(Duration idleTimeout)
-
getIdleTime
final Duration getIdleTime()
-
getNumRunningTasks
final AtomicInteger getNumRunningTasks()
-
getStatusString
final String getStatusString()
-
setStatusString
final Unit setStatusString(String statusString)
-
getVerbose
final Boolean getVerbose()
-
setVerbose
final Unit setVerbose(Boolean verbose)
-
getActiveProxyEntries
final ConcurrentSkipListMap<Path, ProxyEntry> getActiveProxyEntries()
-
getWorkingProxyEntries
final ConcurrentSkipListSet<ProxyEntry> getWorkingProxyEntries()
-
getLocalPort
Integer getLocalPort()
-
getCurrentInterceptProxyEntry
ProxyEntry getCurrentInterceptProxyEntry()
-
getIsEnabled
final Boolean getIsEnabled()
-
getIsDisabled
final Boolean getIsDisabled()
-
getIsActive
final Boolean getIsActive()
-
getProxyPool
final ProxyPool getProxyPool()
-
runWith
<R extends Any> R runWith(ProxyEntry proxyEntry, SuspendFunction0<R> task)
Run the task, it it's disabled, call the innovation directly
-
takeOff
Unit takeOff(ProxyEntry excludedProxy, Boolean ban)
Take off the proxy if it is active proxy, and the monitor will choose the next proxy to connect
-
-
-
-