-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public final class LoadingProxyPool extends ProxyPool
Manage all external proxies Check all unavailable proxies, recover them if possible. This might take a long time, so it should be run in a separate thread
-
-
Field Summary
Fields Modifier and Type Field Description private final ProxyLoaderproxyLoaderprivate final BooleanisActiveprivate InstantlastActiveTimeprivate final Integersize
-
Constructor Summary
Constructors Constructor Description LoadingProxyPool(ProxyLoader proxyLoader, ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description final ProxyLoadergetProxyLoader()final BooleangetIsActive()final InstantgetLastActiveTime()final UnitsetLastActiveTime(Instant lastActiveTime)final IntegergetSize()ProxyEntrytake()Unitretire(ProxyEntry proxyEntry)The proxy may be recovered later Unitreport(ProxyEntry proxyEntry)Unitdump()StringtoString()-
-
Constructor Detail
-
LoadingProxyPool
LoadingProxyPool(ProxyLoader proxyLoader, ImmutableConfig conf)
-
-
Method Detail
-
getProxyLoader
final ProxyLoader getProxyLoader()
-
getIsActive
final Boolean getIsActive()
-
getLastActiveTime
final Instant getLastActiveTime()
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
-
take
ProxyEntry take()
-
retire
Unit retire(ProxyEntry proxyEntry)
The proxy may be recovered later
-
report
Unit report(ProxyEntry proxyEntry)
-
-
-
-