public class FakeRawMemcacheClient extends AbstractRawMemcacheClient
| Modifier and Type | Field and Description |
|---|---|
private boolean |
connected |
private java.util.Map<java.nio.ByteBuffer,byte[]> |
map |
private int |
outstanding |
| Constructor and Description |
|---|
FakeRawMemcacheClient() |
FakeRawMemcacheClient(Metrics metrics) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Throwable |
getConnectionFailure()
Returns the unrecoverable connection failure, if any.
|
java.util.Map<java.nio.ByteBuffer,byte[]> |
getMap() |
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.
|
<T> java.util.concurrent.CompletionStage<T> |
send(Request<T> request) |
void |
setOutstandingRequests(int outstanding) |
void |
shutdown()
Shut down the client.
|
notifyConnectionChange, registerForConnectionChanges, unregisterForConnectionChangesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawaitConnected, awaitDisconnected, awaitFullyConnected, awaitFullyDisconnected, awaitFuture, connectFuture, disconnectFuture, fullyConnectedFuture, fullyDisconnectFutureprivate boolean connected
private final java.util.Map<java.nio.ByteBuffer,byte[]> map
private int outstanding
public FakeRawMemcacheClient()
public FakeRawMemcacheClient(Metrics metrics)
public <T> java.util.concurrent.CompletionStage<T> send(Request<T> request)
public void shutdown()
RawMemcacheClientObservableClient.registerForConnectionChanges(ConnectionChangeListener) to to
get notified when it has (possibly) finished shutting downpublic boolean isConnected()
ObservableClientpublic java.lang.Throwable getConnectionFailure()
ObservableClientpublic int numTotalConnections()
RawMemcacheClientpublic int numActiveConnections()
RawMemcacheClientpublic java.util.Map<java.nio.ByteBuffer,byte[]> getMap()
public void setOutstandingRequests(int outstanding)
Copyright © 2020 Spotify AB. All Rights Reserved.