org.springframework.cache.support
Class NoOpCacheManager.NoOpCache

java.lang.Object
  extended by org.springframework.cache.support.NoOpCacheManager.NoOpCache
All Implemented Interfaces:
Cache
Enclosing class:
NoOpCacheManager

private static class NoOpCacheManager.NoOpCache
extends java.lang.Object
implements Cache


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.springframework.cache.Cache
Cache.ValueWrapper
 
Field Summary
private  java.lang.String name
           
 
Constructor Summary
NoOpCacheManager.NoOpCache(java.lang.String name)
           
 
Method Summary
 void clear()
          Remove all mappings from the cache.
 void evict(java.lang.Object key)
          Evict the mapping for this key from this cache if it is present.
 Cache.ValueWrapper get(java.lang.Object key)
          Return the value to which this cache maps the specified key.
 java.lang.String getName()
          Return the cache name.
 java.lang.Object getNativeCache()
          Return the the underlying native cache provider.
 void put(java.lang.Object key, java.lang.Object value)
          Associate the specified value with the specified key in this cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private final java.lang.String name
Constructor Detail

NoOpCacheManager.NoOpCache

public NoOpCacheManager.NoOpCache(java.lang.String name)
Method Detail

clear

public void clear()
Description copied from interface: Cache
Remove all mappings from the cache.

Specified by:
clear in interface Cache

evict

public void evict(java.lang.Object key)
Description copied from interface: Cache
Evict the mapping for this key from this cache if it is present.

Specified by:
evict in interface Cache
Parameters:
key - the key whose mapping is to be removed from the cache

get

public Cache.ValueWrapper get(java.lang.Object key)
Description copied from interface: Cache
Return the value to which this cache maps the specified key. Returns null if the cache contains no mapping for this key.

Specified by:
get in interface Cache
Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this cache maps the specified key, or null if the cache contains no mapping for this key

getName

public java.lang.String getName()
Description copied from interface: Cache
Return the cache name.

Specified by:
getName in interface Cache

getNativeCache

public java.lang.Object getNativeCache()
Description copied from interface: Cache
Return the the underlying native cache provider.

Specified by:
getNativeCache in interface Cache

put

public void put(java.lang.Object key,
                java.lang.Object value)
Description copied from interface: Cache
Associate the specified value with the specified key in this cache.

If the cache previously contained a mapping for this key, the old value is replaced by the specified value.

Specified by:
put in interface Cache
Parameters:
key - the key with which the specified value is to be associated
value - the value to be associated with the specified key