Package org.oxerr.webmagic.proxy
Class DelayedProxy
java.lang.Object
org.oxerr.webmagic.proxy.DelayedProxy
- All Implemented Interfaces:
Externalizable
,Serializable
,Comparable<Delayed>
,Delayed
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate Instant
private AtomicLong
private us.codecraft.webmagic.proxy.Proxy
private AtomicLong
-
Constructor Summary
ConstructorDescriptionDelayedProxy
(us.codecraft.webmagic.proxy.Proxy proxy) DelayedProxy
(us.codecraft.webmagic.proxy.Proxy proxy, Duration duration) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
long
long
us.codecraft.webmagic.proxy.Proxy
getProxy()
long
int
hashCode()
long
long
void
void
setAvailableTime
(Instant availableTime) void
setProxy
(us.codecraft.webmagic.proxy.Proxy proxy) void
-
Field Details
-
proxy
private transient us.codecraft.webmagic.proxy.Proxy proxy -
availableTime
-
successCount
-
failureCount
-
-
Constructor Details
-
DelayedProxy
public DelayedProxy() -
DelayedProxy
public DelayedProxy(us.codecraft.webmagic.proxy.Proxy proxy) -
DelayedProxy
-
-
Method Details
-
getProxy
public us.codecraft.webmagic.proxy.Proxy getProxy() -
setProxy
public void setProxy(us.codecraft.webmagic.proxy.Proxy proxy) -
getAvailableTime
-
setAvailableTime
-
getSuccessCount
public long getSuccessCount() -
incrementAndGetSuccessCount
public long incrementAndGetSuccessCount() -
getFailureCount
public long getFailureCount() -
incrementAndGetFailureCount
public long incrementAndGetFailureCount() -
getDelay
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Delayed>
-
hashCode
public int hashCode() -
equals
-