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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MemcachedClientIFprivate final intprivate final Stringprivate final Transcoder<V> -
Constructor Summary
ConstructorsConstructorDescriptionBaseCacheMap(MemcachedClientIF c, int expiration, String prefix, Transcoder<V> t) Build a BaseCacheMap. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
keyPrefix
-
transcoder
-
client
-
exp
private final int exp
-
-
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
-
getKey
-
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
-
keySet
-
putAll
-
remove
-
size
-
values
-
put
-