org.castor.cache.simple
Class NoCache<K,V>

java.lang.Object
  extended by org.castor.cache.AbstractBaseCache<K,V>
      extended by org.castor.cache.simple.NoCache<K,V>
Type Parameters:
K - the type of keys maintained by this cache
V - the type of cached values
All Implemented Interfaces:
Map<K,V>, Cache<K,V>

public final class NoCache<K,V>
extends AbstractBaseCache<K,V>

NoCache is a Map which dispose all object right the way. Every object being put in the Map will be disposed.

Since:
1.0
Version:
$Revision: 9040 $ $Date: 2011-08-16 08:26:59 +0200 (Di, 16 Aug 2011) $
Author:
Werner Guttmann, Ralf Joachim

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static String TYPE
          The type of the cache.
 
Fields inherited from interface org.castor.cache.Cache
DEFAULT_DEBUG, DEFAULT_NAME, DEFAULT_TYPE, PARAM_DEBUG, PARAM_NAME, PARAM_TYPE
 
Constructor Summary
NoCache()
           
 
Method Summary
 void clear()
          
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 Set<Map.Entry<K,V>> entrySet()
          
 V get(Object key)
          
 String getType()
          Indicates the type of this cache.
 boolean isEmpty()
          
 Set<K> keySet()
          
 V put(K key, V value)
          
 void putAll(Map<? extends K,? extends V> map)
          
 V remove(Object key)
          
 int size()
          
 Collection<V> values()
          
 
Methods inherited from class org.castor.cache.AbstractBaseCache
close, expire, expireAll, getName, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

TYPE

public static final String TYPE
The type of the cache.

See Also:
Constant Field Values
Constructor Detail

NoCache

public NoCache()
Method Detail

getType

public String getType()
Indicates the type of this cache.

Returns:
The cache type.

size

public int size()


isEmpty

public boolean isEmpty()


containsKey

public boolean containsKey(Object key)


containsValue

public boolean containsValue(Object value)


get

public V get(Object key)


put

public V put(K key,
             V value)


remove

public V remove(Object key)


putAll

public void putAll(Map<? extends K,? extends V> map)


clear

public void clear()


keySet

public Set<K> keySet()


values

public Collection<V> values()


entrySet

public Set<Map.Entry<K,V>> entrySet()



Copyright © 2012. All Rights Reserved.