Package net.rubyeye.xmemcached.impl
Class ReconnectRequest
- java.lang.Object
-
- net.rubyeye.xmemcached.impl.ReconnectRequest
-
- All Implemented Interfaces:
Comparable<Delayed>,Delayed
public final class ReconnectRequest extends Object implements Delayed
A auto reconnect request,associating a socket address for reconnecting- Author:
- dennis
-
-
Constructor Summary
Constructors Constructor Description ReconnectRequest(InetSocketAddressWrapper inetSocketAddressWrapper, int tries, long reconnectInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Delayed o)longgetDelay(TimeUnit unit)InetSocketAddressWrappergetInetSocketAddressWrapper()Returns a reconnect socket address wrapperintgetTries()Returns retry timesvoidsetInetSocketAddressWrapper(InetSocketAddressWrapper inetSocketAddressWrapper)voidsetTries(int tries)voidupdateNextReconnectTimeStamp(long interval)
-
-
-
Constructor Detail
-
ReconnectRequest
public ReconnectRequest(InetSocketAddressWrapper inetSocketAddressWrapper, int tries, long reconnectInterval)
-
-
Method Detail
-
compareTo
public int compareTo(Delayed o)
- Specified by:
compareToin interfaceComparable<Delayed>
-
getInetSocketAddressWrapper
public final InetSocketAddressWrapper getInetSocketAddressWrapper()
Returns a reconnect socket address wrapper- Returns:
- See Also:
InetSocketAddressWrapper
-
updateNextReconnectTimeStamp
public void updateNextReconnectTimeStamp(long interval)
-
setInetSocketAddressWrapper
public final void setInetSocketAddressWrapper(InetSocketAddressWrapper inetSocketAddressWrapper)
-
setTries
public final void setTries(int tries)
-
getTries
public final int getTries()
Returns retry times- Returns:
- retry times,it is zero if it does not retry to connect
-
-