Package ai.platon.pulsar.common.proxy
Class FileProxyLoader
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class FileProxyLoader extends ProxyLoader
Load proxies from files
-
-
Field Summary
Fields Modifier and Type Field Description private DurationminimumProxyTTLprivate BooleantestProxyBeforeUseprivate StringtestUrlprivate final DurationfileWatchIntervalprivate final Map<Path, Instant>lastModifiedTimesprivate StringbanStrategyprivate DurationipTimeToBanprivate DurationsegmentTimeToBanprivate final ConcurrentPassiveExpiringSet<String>bannedIpsprivate final ConcurrentPassiveExpiringSet<String>bannedSegmentsprivate DoubletestIpRateprivate final BooleanisActive
-
Constructor Summary
Constructors Constructor Description FileProxyLoader(ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description List<ProxyEntry>updateProxies(Duration reloadInterval)-
Methods inherited from class ai.platon.pulsar.common.proxy.ProxyLoader
close, getBanStrategy, getBannedIps, getBannedSegments, getFileWatchInterval, getIpTimeToBan, getLastModifiedTimes, getMinimumProxyTTL, getSegmentTimeToBan, getTestIpRate, getTestProxyBeforeUse, getTestUrl, isActive, loadTestProxyIfAbsent, setBanStrategy, setIpTimeToBan, setMinimumProxyTTL, setSegmentTimeToBan, setTestIpRate, setTestProxyBeforeUse, setTestUrl, updateBanStrategy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FileProxyLoader
FileProxyLoader(ImmutableConfig conf)
-
-
Method Detail
-
updateProxies
@Synchronized() List<ProxyEntry> updateProxies(Duration reloadInterval)
-
-
-
-