Package ai.platon.pulsar.common.proxy
Class ProxyEntry
-
- All Implemented Interfaces:
-
kotlin.Comparable
@Deprecated(message = "Use ProxyEntry2 instead", replaceWith = @ReplaceWith(imports = {}, expression = "ProxyEntry2")) 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 StringgetProtocol()final StringgetUsername()final StringgetPassword()final BooleangetRotatable()Specify whether we can rotate the out ip via a link. final UnitsetRotatable(Boolean rotatable)Specify whether we can rotate the out ip via a link. final StringgetRotateURL()The link to tell the proxy vendor to rotate the out ip. final UnitsetRotateURL(String rotateURL)The link to tell the proxy vendor to rotate the out ip. 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 BooleanisExpired()final BooleanisRetired()final BooleanisFree()final BooleanisWorking()final BooleanisBanned()final BooleanisFailed()final BooleanisGone()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 BooleanisIdle()final BooleanisReady()final StringgetReadableState()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 BooleanisTestIp()Check if the proxy is used for test final UnitsetTestIp(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()
-
getProtocol
final String getProtocol()
-
getUsername
final String getUsername()
-
getPassword
final String getPassword()
-
getRotatable
final Boolean getRotatable()
Specify whether we can rotate the out ip via a link.
-
setRotatable
final Unit setRotatable(Boolean rotatable)
Specify whether we can rotate the out ip via a link.
-
getRotateURL
final String getRotateURL()
The link to tell the proxy vendor to rotate the out ip.
-
setRotateURL
final Unit setRotateURL(String rotateURL)
The link to tell the proxy vendor to rotate the out ip.
-
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()
-
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()
-
getReadableState
final String getReadableState()
-
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
-
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)
-
-
-
-