public class NoOpCacheManager extends java.lang.Object implements CacheManager
CacheManager
implementation suitable
for disabling caching, typically used for backing cache declarations
without an actual backing store.
Will simply accept any items into the cache not actually storing them.
CompositeCacheManager
Modifier and Type | Class and Description |
---|---|
private static class |
NoOpCacheManager.NoOpCache |
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentMap<java.lang.String,Cache> |
caches |
private java.util.Set<java.lang.String> |
names |
Constructor and Description |
---|
NoOpCacheManager() |
Modifier and Type | Method and Description |
---|---|
Cache |
getCache(java.lang.String name)
Return the cache associated with the given name.
|
java.util.Collection<java.lang.String> |
getCacheNames()
Return a collection of the caches known by this cache manager.
|
private final java.util.concurrent.ConcurrentMap<java.lang.String,Cache> caches
private java.util.Set<java.lang.String> names
public Cache getCache(java.lang.String name)
Cache
implementation that will not
store items. Additionally, the request cache will be remembered by the manager for consistency.getCache
in interface CacheManager
name
- cache identifier (must not be null
)null
if none is foundpublic java.util.Collection<java.lang.String> getCacheNames()
getCacheNames
in interface CacheManager