-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class ProxyPool implements AutoCloseable
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.
-
-
Constructor Summary
Constructors Constructor Description ProxyPool(ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description final BooleangetIsActive()final InstantgetLastActiveTime()final UnitsetLastActiveTime(Instant lastActiveTime)final IntegergetSize()final Booleancontains(ProxyEntry element)final Iterator<ProxyEntry>iterator()final Unitclear()Booleanoffer(ProxyEntry proxyEntry)ProxyEntrytake()Unitretire(ProxyEntry proxyEntry)The proxy may be recovered later Unitreport(ProxyEntry proxyEntry)Unitdump()StringtoString()Unitclose()-
-
Constructor Detail
-
ProxyPool
ProxyPool(ImmutableConfig conf)
-
-
Method Detail
-
getIsActive
final Boolean getIsActive()
-
getLastActiveTime
final Instant getLastActiveTime()
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
-
contains
final Boolean contains(ProxyEntry element)
-
iterator
final Iterator<ProxyEntry> iterator()
-
offer
Boolean offer(ProxyEntry proxyEntry)
-
take
ProxyEntry take()
-
retire
Unit retire(ProxyEntry proxyEntry)
The proxy may be recovered later
-
report
Unit report(ProxyEntry proxyEntry)
-
-
-
-