public class MemcachedCache<V> extends Object implements PersistenceCache<String,V>
| Constructor and Description |
|---|
MemcachedCache(ProxyMemcachedClient memcachedClient,
String discriminator,
Class<V> valueClass,
int timeToLiveSeconds) |
| Modifier and Type | Method and Description |
|---|---|
V |
get(String key) |
Map<String,V> |
get(String[] keys) |
int |
getDefaultTimeToLiveSeconds() |
ProxyMemcachedClient |
getMemcachedClient() |
CASValue<V> |
getViaCas(String key) |
V |
putIfAbsent(String key,
V value,
int timeToLiveSeconds) |
boolean |
putViaCas(String key,
V oldValue,
V value,
long version,
int timeToLiveSeconds) |
void |
remove(String key) |
boolean |
requiresCopyOnDistributedCASOperation() |
void |
set(String key,
V value,
int timeToLiveSeconds) |
public MemcachedCache(ProxyMemcachedClient memcachedClient, String discriminator, Class<V> valueClass, int timeToLiveSeconds)
public ProxyMemcachedClient getMemcachedClient()
public boolean requiresCopyOnDistributedCASOperation()
requiresCopyOnDistributedCASOperation in interface PersistenceCache<String,V>public int getDefaultTimeToLiveSeconds()
getDefaultTimeToLiveSeconds in interface PersistenceCache<String,V>public V get(String key) throws CacheOperationException
get in interface PersistenceCache<String,V>CacheOperationExceptionpublic Map<String,V> get(String[] keys) throws CacheOperationException
get in interface PersistenceCache<String,V>CacheOperationExceptionpublic void set(String key, V value, int timeToLiveSeconds)
set in interface PersistenceCache<String,V>public V putIfAbsent(String key, V value, int timeToLiveSeconds)
putIfAbsent in interface PersistenceCache<String,V>public CASValue<V> getViaCas(String key)
getViaCas in interface PersistenceCache<String,V>public boolean putViaCas(String key, V oldValue, V value, long version, int timeToLiveSeconds)
putViaCas in interface PersistenceCache<String,V>public void remove(String key)
remove in interface PersistenceCache<String,V>Copyright © 2017. All rights reserved.