Package net.spy.memcached
Class BaseCacheMap<V>
java.lang.Object
net.spy.memcached.BaseCacheMap<V>
- Type Parameters:
V- the type of value taken and returned by this Map's underlying transcoder, and thus taken and returned by this Map.
- Direct Known Subclasses:
CacheMap
Base class for a Map interface to memcached.
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.
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBaseCacheMap(MemcachedClientIF c, int expiration, String prefix, Transcoder<V> t) Build a BaseCacheMap. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) This method always returns false, as truth cannot be determined without iteration.entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
BaseCacheMap
Build a BaseCacheMap.- Parameters:
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 objects
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,V>
-
containsValue
This method always returns false, as truth cannot be determined without iteration.- Specified by:
containsValuein interfaceMap<String,V>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
putAll
-
remove
-
size
public int size() -
values
-
put
-