V - the type of value taken and returned by this Map's underlying
transcoder, and thus taken and returned by this Map.public class BaseCacheMap<V> extends Object implements Map<String,V>
This Map interface makes memcached a bit easier to use for some purposes by providing a limited Map implementation.
Do note that nothing that iterates over the map will work (such is memcached). All iteration mechanisms will return empty iterators and such.
| Constructor and Description |
|---|
BaseCacheMap(MemcachedClientIF c,
int expiration,
String prefix,
Transcoder<V> t)
Build a BaseCacheMap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value)
This method always returns false, as truth cannot be determined without
iteration.
|
Set<Map.Entry<String,V>> |
entrySet() |
V |
get(Object key) |
boolean |
isEmpty() |
Set<String> |
keySet() |
V |
put(String key,
V value) |
void |
putAll(Map<? extends String,? extends V> t) |
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic BaseCacheMap(MemcachedClientIF c, int expiration, String prefix, Transcoder<V> t)
c - the underlying clientexpiration - the expiration for objects set through this Mapprefix - a prefix to ensure objects in this map are uniquet - the transcoder to serialize and deserialize objectspublic boolean containsKey(Object key)
containsKey in interface Map<String,V>public boolean containsValue(Object value)
containsValue in interface Map<String,V>Copyright © 2019. All rights reserved.