public class MemcachedClient extends java.lang.Object implements Cache
Cache.Entry<K,V>, Cache.EntryProcessor<K,V>, Cache.MutableEntry<K,V>
Constructor and Description |
---|
MemcachedClient() |
MemcachedClient(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAddress(java.lang.String address) |
void |
addServer(java.lang.String address,
int port) |
boolean |
containsKey(java.lang.Object key) |
java.lang.Object |
get(java.lang.Object key) |
java.util.Map |
getAll(java.util.Set keys) |
java.lang.Object |
getAndPut(java.lang.Object key,
java.lang.Object value) |
java.lang.Object |
getAndRemove(java.lang.Object key) |
java.lang.Object |
getAndReplace(java.lang.Object key,
java.lang.Object value) |
CacheManager |
getCacheManager() |
Configuration |
getConfiguration() |
CacheMXBean |
getMBean() |
java.lang.String |
getName() |
CacheStatistics |
getStatistics() |
Status |
getStatus() |
void |
init() |
java.lang.Object |
invokeEntryProcessor(java.lang.Object key,
Cache.EntryProcessor entryProcessor) |
java.util.Iterator |
iterator() |
java.util.concurrent.Future |
load(java.lang.Object key) |
java.util.concurrent.Future |
loadAll(java.util.Set keys) |
void |
put(java.lang.Object key,
java.lang.Object value) |
void |
putAll(java.util.Map map) |
boolean |
putIfAbsent(java.lang.Object key,
java.lang.Object value) |
boolean |
registerCacheEntryListener(CacheEntryListener listener,
boolean requireOldValue,
CacheEntryEventFilter filter,
boolean synchronous) |
boolean |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object oldValue) |
void |
removeAll() |
void |
removeAll(java.util.Set keys) |
boolean |
replace(java.lang.Object key,
java.lang.Object value) |
boolean |
replace(java.lang.Object key,
java.lang.Object oldValue,
java.lang.Object newValue) |
void |
setCluster(java.lang.String cluster) |
void |
setModifiedExpireTimeout(Period timeout) |
void |
setPort(int port) |
void |
start() |
void |
stop() |
java.lang.String |
toString() |
boolean |
unregisterCacheEntryListener(CacheEntryListener listener) |
java.lang.Object |
unwrap(java.lang.Class cl) |
public MemcachedClient()
public MemcachedClient(java.lang.String name)
public void addServer(java.lang.String address, int port)
public void addAddress(java.lang.String address)
public void setCluster(java.lang.String cluster)
public void setPort(int port)
@Configurable public void setModifiedExpireTimeout(Period timeout)
public boolean containsKey(java.lang.Object key) throws CacheException
containsKey
in interface Cache
CacheException
public java.lang.Object get(java.lang.Object key) throws CacheException
get
in interface Cache
CacheException
public void put(java.lang.Object key, java.lang.Object value) throws CacheException
put
in interface Cache
CacheException
public boolean remove(java.lang.Object key) throws CacheException
remove
in interface Cache
CacheException
@PostConstruct public void init()
public java.lang.Object getAndPut(java.lang.Object key, java.lang.Object value) throws CacheException
getAndPut
in interface Cache
CacheException
public java.lang.Object getAndRemove(java.lang.Object key) throws CacheException
getAndRemove
in interface Cache
CacheException
public java.lang.Object getAndReplace(java.lang.Object key, java.lang.Object value) throws CacheException
getAndReplace
in interface Cache
CacheException
public CacheStatistics getStatistics()
getStatistics
in interface Cache
public Configuration getConfiguration()
getConfiguration
in interface Cache
public java.util.concurrent.Future load(java.lang.Object key) throws CacheException
load
in interface Cache
CacheException
public java.util.concurrent.Future loadAll(java.util.Set keys) throws CacheException
loadAll
in interface Cache
CacheException
public void putAll(java.util.Map map) throws CacheException
putAll
in interface Cache
CacheException
public boolean putIfAbsent(java.lang.Object key, java.lang.Object value) throws CacheException
putIfAbsent
in interface Cache
CacheException
public boolean remove(java.lang.Object key, java.lang.Object oldValue) throws CacheException
remove
in interface Cache
CacheException
public void removeAll() throws CacheException
removeAll
in interface Cache
CacheException
public boolean replace(java.lang.Object key, java.lang.Object oldValue, java.lang.Object newValue) throws CacheException
replace
in interface Cache
CacheException
public boolean replace(java.lang.Object key, java.lang.Object value) throws CacheException
replace
in interface Cache
CacheException
public boolean unregisterCacheEntryListener(CacheEntryListener listener)
unregisterCacheEntryListener
in interface Cache
public java.util.Iterator iterator()
public Status getStatus()
getStatus
in interface CacheLifecycle
public void start() throws CacheException
start
in interface CacheLifecycle
CacheException
public CacheMXBean getMBean()
public void stop() throws CacheException
stop
in interface CacheLifecycle
CacheException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object invokeEntryProcessor(java.lang.Object key, Cache.EntryProcessor entryProcessor)
invokeEntryProcessor
in interface Cache
public CacheManager getCacheManager()
getCacheManager
in interface Cache
public boolean registerCacheEntryListener(CacheEntryListener listener, boolean requireOldValue, CacheEntryEventFilter filter, boolean synchronous)
registerCacheEntryListener
in interface Cache