public class FakeRawMemcacheClient extends AbstractRawMemcacheClient
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
address |
private boolean |
connected |
private java.lang.Throwable |
failure |
private java.util.Map<java.nio.ByteBuffer,byte[]> |
map |
private int |
outstanding |
| Constructor and Description |
|---|
FakeRawMemcacheClient() |
FakeRawMemcacheClient(Metrics metrics) |
FakeRawMemcacheClient(Metrics metrics,
java.lang.String address) |
| 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 |
numPendingRequests() |
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 |
setConnected() |
void |
setFailure(java.lang.Throwable failure) |
void |
setOutstandingRequests(int outstanding) |
void |
shutdown()
Shut down the client.
|
java.util.stream.Stream<AddressAndClient> |
streamNodes()
Intended for internal usage.
|
java.lang.String |
toString() |
notifyConnectionChange, numListeners, registerForConnectionChanges, unregisterForConnectionChangesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAllNodesawaitConnected, awaitDisconnected, awaitFullyConnected, awaitFullyDisconnected, awaitFuture, connectFuture, disconnectFuture, fullyConnectedFuture, fullyDisconnectFutureprivate boolean connected
private final java.util.Map<java.nio.ByteBuffer,byte[]> map
private int outstanding
private final java.lang.String address
private java.lang.Throwable failure
public FakeRawMemcacheClient()
public FakeRawMemcacheClient(Metrics metrics)
public FakeRawMemcacheClient(Metrics metrics, java.lang.String address)
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 void setConnected()
public void setFailure(java.lang.Throwable failure)
public boolean isConnected()
ObservableClientpublic java.lang.Throwable getConnectionFailure()
ObservableClientpublic int numTotalConnections()
RawMemcacheClientpublic int numActiveConnections()
RawMemcacheClientpublic int numPendingRequests()
public java.util.stream.Stream<AddressAndClient> streamNodes()
RawMemcacheClientRawMemcacheClient.getAllNodes() instead.public java.util.Map<java.nio.ByteBuffer,byte[]> getMap()
public void setOutstandingRequests(int outstanding)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2023 Spotify AB. All Rights Reserved.