Package net.spy.memcached
Class CacheMap
- java.lang.Object
-
- net.spy.memcached.BaseCacheMap<java.lang.Object>
-
- net.spy.memcached.CacheMap
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>
public class CacheMap extends BaseCacheMap<java.lang.Object>
A Map interface to memcached.Do note that nothing that iterates over the map will work (such is memcached). All iteration mechanisms will return empty iterators and such.
-
-
Constructor Summary
Constructors Constructor Description CacheMap(MemcachedClientIF c, int expiration, java.lang.String prefix)
Construct a CacheMap over the given MemcachedClient.CacheMap(MemcachedClientIF c, java.lang.String prefix)
Construct a CacheMap over the given MemcachedClient with no expiration.
-
Method Summary
-
Methods inherited from class net.spy.memcached.BaseCacheMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
-
-
-
-
Constructor Detail
-
CacheMap
public CacheMap(MemcachedClientIF c, int expiration, java.lang.String prefix)
Construct a CacheMap over the given MemcachedClient.- Parameters:
c
- the clientexpiration
- the expiration to set for keys written to the cacheprefix
- a prefix used to make keys in this map unique
-
CacheMap
public CacheMap(MemcachedClientIF c, java.lang.String prefix)
Construct a CacheMap over the given MemcachedClient with no expiration.Keys written into this Map will only expire when the LRU pushes them out.
- Parameters:
c
- the clientprefix
- a prefix used to make keys in this map unique
-
-