public class RetryingClient extends Object implements RawMemcacheClient
| Modifier and Type | Field and Description |
|---|---|
private RawMemcacheClient |
delegate |
| Constructor and Description |
|---|
RetryingClient(RawMemcacheClient delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isConnected()
Is the client connected to a server?
|
int |
numActiveConnections()
How many active socket connections do we have (i.e.
|
int |
numTotalConnections()
How many actual socket connections do we have, including currently disconnected clients.
|
void |
registerForConnectionChanges(ConnectionChangeListener listener)
Register for connection change events.
|
<T> com.google.common.util.concurrent.ListenableFuture<T> |
send(Request<T> request) |
void |
shutdown()
Shut down the client.
|
String |
toString() |
void |
unregisterForConnectionChanges(ConnectionChangeListener listener)
Unregister the provided listener so that it no longer receives connection change
callbacks.
|
private final RawMemcacheClient delegate
public RetryingClient(RawMemcacheClient delegate)
public <T> com.google.common.util.concurrent.ListenableFuture<T> send(Request<T> request)
send in interface RawMemcacheClientpublic void shutdown()
RawMemcacheClientObservableClient.registerForConnectionChanges(ConnectionChangeListener) to
to get notified when it has (possibly) finished shutting downshutdown in interface RawMemcacheClientpublic boolean isConnected()
ObservableClientisConnected in interface ObservableClientpublic int numTotalConnections()
RawMemcacheClientnumTotalConnections in interface RawMemcacheClientpublic int numActiveConnections()
RawMemcacheClientnumActiveConnections in interface RawMemcacheClientpublic void registerForConnectionChanges(ConnectionChangeListener listener)
ObservableClientregisterForConnectionChanges in interface ObservableClientlistener - the listener to notify of connection changespublic void unregisterForConnectionChanges(ConnectionChangeListener listener)
ObservableClientunregisterForConnectionChanges in interface ObservableClientlistener - the listener to unregister.Copyright © 2017 Spotify AB. All rights reserved.