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.
- All Implemented Interfaces: 
 - Map<String,V>
 
- Direct Known Subclasses: 
 - CacheMap
 
public class BaseCacheMap<V>
- extends Object
- implements Map<String,V>
  
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 classes/interfaces inherited from interface java.util.Map | 
Map.Entry<K,V> | 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
BaseCacheMap
public BaseCacheMap(MemcachedClientIF c,
                    int expiration,
                    String prefix,
                    Transcoder<V> t)
- 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
 
clear
public void clear()
- Specified by:
 clear in interface Map<String,V>
 
 
containsKey
public boolean containsKey(Object key)
- Specified by:
 containsKey in interface Map<String,V>
 
 
containsValue
public boolean containsValue(Object value)
- This method always returns false, as truth cannot be determined without
 iteration.
- Specified by:
 containsValue in interface Map<String,V>
 
 
 
entrySet
public Set<Map.Entry<String,V>> entrySet()
- Specified by:
 entrySet in interface Map<String,V>
 
 
get
public V get(Object key)
- Specified by:
 get in interface Map<String,V>
 
 
isEmpty
public boolean isEmpty()
- Specified by:
 isEmpty in interface Map<String,V>
 
 
keySet
public Set<String> keySet()
- Specified by:
 keySet in interface Map<String,V>
 
 
putAll
public void putAll(Map<? extends String,? extends V> t)
- Specified by:
 putAll in interface Map<String,V>
 
 
remove
public V remove(Object key)
- Specified by:
 remove in interface Map<String,V>
 
 
size
public int size()
- Specified by:
 size in interface Map<String,V>
 
 
values
public Collection<V> values()
- Specified by:
 values in interface Map<String,V>
 
 
put
public V put(String key,
             V value)
- Specified by:
 put in interface Map<String,V>