public interface MemcacheClient<V>
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
add(String key,
V value,
int ttl)
Add a key in memcache with the provided value, with the specified TTL.
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
append(String key,
V value) |
com.google.common.util.concurrent.ListenableFuture<List<GetResult<V>>> |
casGet(List<String> keys)
Get the value for the provided keys
|
com.google.common.util.concurrent.ListenableFuture<GetResult<V>> |
casGet(String key)
Get the value for the provided key, including the CAS value
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
delete(String key)
Delete the provided key
|
com.google.common.util.concurrent.ListenableFuture<List<V>> |
get(List<String> keys)
Get the value for the provided keys
|
com.google.common.util.concurrent.ListenableFuture<V> |
get(String key)
Get the value for the provided key
|
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.
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
prepend(String key,
V value) |
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
replace(String key,
V value,
int ttl)
Replace a key in memcache with the provided value, with the specified TTL.
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
set(String key,
V value,
int ttl)
Set a key in memcache to the provided value, with the specified TTL
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
set(String key,
V value,
int ttl,
long cas)
Compare and set a key in memcache to the provided value, with the specified TTL
|
void |
shutdown()
Shut down the client.
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> |
touch(String key,
int ttl)
Sets the expiration for the provided key
|
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> set(String key, V value, int ttl)
key - The key, must not be nullvalue - The value, must not be nullttl - The TTL in secondscom.google.common.util.concurrent.ListenableFuture<MemcacheStatus> set(String key, V value, int ttl, long cas)
key - The key, must not be nullvalue - The value, must not be nullttl - The TTL in secondscas - The CAS value, must match the value on the server for the set to go throughcom.google.common.util.concurrent.ListenableFuture<MemcacheStatus> delete(String key)
key - Key, must not be nullcom.google.common.util.concurrent.ListenableFuture<MemcacheStatus> add(String key, V value, int ttl)
key - The key, must not be nullvalue - The value, must not be nullttl - The TTL in secondscom.google.common.util.concurrent.ListenableFuture<MemcacheStatus> replace(String key, V value, int ttl)
key - The key, must not be nullvalue - The value, must not be nullttl - The TTL in secondscom.google.common.util.concurrent.ListenableFuture<MemcacheStatus> append(String key, V value)
com.google.common.util.concurrent.ListenableFuture<MemcacheStatus> prepend(String key, V value)
com.google.common.util.concurrent.ListenableFuture<V> get(String key)
key - The key, must not be nullcom.google.common.util.concurrent.ListenableFuture<GetResult<V>> casGet(String key)
key - First key, must not be nullcom.google.common.util.concurrent.ListenableFuture<List<V>> get(List<String> keys)
keys - Keys, must not be null, nor must any key in the listcom.google.common.util.concurrent.ListenableFuture<List<GetResult<V>>> casGet(List<String> keys)
keys - Keys, must not be null, nor must any key in the listcom.google.common.util.concurrent.ListenableFuture<MemcacheStatus> touch(String key, int ttl)
key - First key, must not be nullttl - The TTL in secondsvoid shutdown()
boolean isConnected()
int numTotalConnections()
int numActiveConnections()
Copyright © 2015 Spotify AB. All Rights Reserved.