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 PathproxyDirprivate 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 final PathgetProxyDir()final UnitsetProxyDir(Path proxyDir)List<ProxyEntry>updateProxies(Duration reloadInterval)final List<ProxyEntry>loadProxies()final List<ProxyEntry>loadProxies(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, updateProxies -
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
-
getProxyDir
final Path getProxyDir()
-
setProxyDir
final Unit setProxyDir(Path proxyDir)
-
updateProxies
@Synchronized() List<ProxyEntry> updateProxies(Duration reloadInterval)
-
loadProxies
final List<ProxyEntry> loadProxies()
-
loadProxies
final List<ProxyEntry> loadProxies(Duration reloadInterval)
-
-
-
-