-
- All Implemented Interfaces:
-
kotlin.Comparable
public final class ProxyEntry implements Comparable<ProxyEntry>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumProxyEntry.Statuspublic enumProxyEntry.BanStatepublic classProxyEntry.Companion
-
Field Summary
-
Method Summary
Modifier and Type Method Description final StringgetHostPort()final StringgetSegment()final StringgetOutSegment()final InstantgetStartTime()final DurationgetElapsedTime()final StringgetDisplay()final StringgetMetadata()final Function2<URL, Proxy, Boolean>getNetworkTester()final UnitsetNetworkTester(Function2<URL, Proxy, Boolean> networkTester)final AtomicIntegergetNumTests()final AtomicIntegergetNumConnectionLosses()final AtomicLonggetAccumResponseMillis()final InstantgetAvailableTime()final UnitsetAvailableTime(Instant availableTime)final AtomicIntegergetNumFailedPages()final AtomicIntegergetNumSuccessPages()final ConcurrentHashMultiset<String>getServedDomains()final AtomicReference<ProxyEntry.Status>getStatus()final DoublegetTestSpeed()final InstantgetTtl()final DurationgetTtlDuration()final BooleangetIsExpired()final BooleangetIsRetired()final BooleangetIsFree()final BooleangetIsWorking()final BooleangetIsBanned()final BooleangetIsFailed()final BooleangetIsGone()final AtomicIntegergetNumRunningTasks()final InstantgetLastActiveTime()Last time to use this proxy final UnitsetLastActiveTime(Instant lastActiveTime)Last time to use this proxy final DurationgetIdleTimeout()final UnitsetIdleTimeout(Duration idleTimeout)final DurationgetIdleTime()final BooleangetIsIdle()final StringgetHost()The host of the proxy server final UnitsetHost(String host)The host of the proxy server final IntegergetPort()The port of the proxy server final UnitsetPort(Integer port)The port of the proxy server final StringgetOutIp()The out ip which will be seen by the target site final UnitsetOutIp(String outIp)The out ip which will be seen by the target site final IntegergetId()The proxy entry id, it's unique in the process scope final UnitsetId(Integer id)The proxy entry id, it's unique in the process scope final InstantgetDeclaredTTL()The time to live of the proxy entry declared by the proxy vendor final UnitsetDeclaredTTL(Instant declaredTTL)The time to live of the proxy entry declared by the proxy vendor final StringgetLastTarget()The last target url final UnitsetLastTarget(String lastTarget)The last target url final List<URL>getTestUrls()The test urls final UnitsetTestUrls(List<URL> testUrls)The test urls final URLgetDefaultTestUrl()The default test url final UnitsetDefaultTestUrl(URL defaultTestUrl)The default test url final BooleangetIsTestIp()Check if the proxy is used for test final UnitsetIsTestIp(Boolean isTestIp)Check if the proxy is used for test final ProxyTypegetProxyType()The proxy type final UnitsetProxyType(ProxyType proxyType)The proxy type final StringgetUser()The username final UnitsetUser(String user)The username final StringgetPwd()The password final UnitsetPwd(String pwd)The password final BooleanwillExpireAt(Instant instant)final BooleanwillExpireAfter(Duration duration)final UnitsetFree()final UnitstartWork()final Unitretire()final Unitrefresh()final Booleantest()final Booleantest(URL target, Duration timeout)final Stringserialize()The string representation, can be parsed using parse IntegerhashCode()Booleanequals(Object other)StringtoString()The string representation, can be parsed using parse IntegercompareTo(ProxyEntry other)-
-
Method Detail
-
getHostPort
final String getHostPort()
-
getSegment
final String getSegment()
-
getOutSegment
final String getOutSegment()
-
getStartTime
final Instant getStartTime()
-
getElapsedTime
final Duration getElapsedTime()
-
getDisplay
final String getDisplay()
-
getMetadata
final String getMetadata()
-
getNetworkTester
final Function2<URL, Proxy, Boolean> getNetworkTester()
-
setNetworkTester
final Unit setNetworkTester(Function2<URL, Proxy, Boolean> networkTester)
-
getNumTests
final AtomicInteger getNumTests()
-
getNumConnectionLosses
final AtomicInteger getNumConnectionLosses()
-
getAccumResponseMillis
final AtomicLong getAccumResponseMillis()
-
getAvailableTime
final Instant getAvailableTime()
-
setAvailableTime
final Unit setAvailableTime(Instant availableTime)
-
getNumFailedPages
final AtomicInteger getNumFailedPages()
-
getNumSuccessPages
final AtomicInteger getNumSuccessPages()
-
getServedDomains
final ConcurrentHashMultiset<String> getServedDomains()
-
getStatus
final AtomicReference<ProxyEntry.Status> getStatus()
-
getTestSpeed
final Double getTestSpeed()
-
getTtlDuration
final Duration getTtlDuration()
-
getIsExpired
final Boolean getIsExpired()
-
getIsRetired
final Boolean getIsRetired()
-
getIsWorking
final Boolean getIsWorking()
-
getIsBanned
final Boolean getIsBanned()
-
getIsFailed
final Boolean getIsFailed()
-
getNumRunningTasks
final AtomicInteger getNumRunningTasks()
-
getLastActiveTime
final Instant getLastActiveTime()
Last time to use this proxy
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
Last time to use this proxy
-
getIdleTimeout
final Duration getIdleTimeout()
-
setIdleTimeout
final Unit setIdleTimeout(Duration idleTimeout)
-
getIdleTime
final Duration getIdleTime()
-
getDeclaredTTL
final Instant getDeclaredTTL()
The time to live of the proxy entry declared by the proxy vendor
-
setDeclaredTTL
final Unit setDeclaredTTL(Instant declaredTTL)
The time to live of the proxy entry declared by the proxy vendor
-
getLastTarget
final String getLastTarget()
The last target url
-
setLastTarget
final Unit setLastTarget(String lastTarget)
The last target url
-
getTestUrls
final List<URL> getTestUrls()
The test urls
-
setTestUrls
final Unit setTestUrls(List<URL> testUrls)
The test urls
-
getDefaultTestUrl
final URL getDefaultTestUrl()
The default test url
-
setDefaultTestUrl
final Unit setDefaultTestUrl(URL defaultTestUrl)
The default test url
-
getIsTestIp
final Boolean getIsTestIp()
Check if the proxy is used for test
-
setIsTestIp
final Unit setIsTestIp(Boolean isTestIp)
Check if the proxy is used for test
-
getProxyType
final ProxyType getProxyType()
The proxy type
-
setProxyType
final Unit setProxyType(ProxyType proxyType)
The proxy type
-
willExpireAt
final Boolean willExpireAt(Instant instant)
-
willExpireAfter
final Boolean willExpireAfter(Duration duration)
-
compareTo
Integer compareTo(ProxyEntry other)
-
-
-
-