public class CompositeCacheManager extends Object implements CacheManager, InitializingBean
CacheManagerimplementation that iterates over a given collection of delegate
NoOpCacheManager to be automatically added to the end of
the list for handling cache declarations without a backing store. Otherwise,
CacheManager may play that role of the last delegate as
well, lazily creating cache regions for any requested name.
Note: Regular CacheManagers that this composite manager delegates to need
getCache(String) if they are unaware of
the specified cache name, allowing for iteration to the next delegate in line.
CacheManager implementations fall back to lazy creation
of named caches once requested; check out the specific configuration details
for a 'static' mode with fixed cache names, if available.
|Constructor and Description|
Construct an empty CompositeCacheManager, with delegate CacheManagers to be added via the
Construct a CompositeCacheManager from the given delegate CacheManagers.
|Modifier and Type||Method and Description|
Invoked by the containing
Return the cache associated with the given name.
Return a collection of the cache names known by this manager.
Specify the CacheManagers to delegate to.
Indicate whether a
public CompositeCacheManager(CacheManager... cacheManagers)
cacheManagers- the CacheManagers to delegate to
public void setCacheManagers(Collection<CacheManager> cacheManagers)
public void setFallbackToNoOpCache(boolean fallbackToNoOpCache)
public void afterPropertiesSet()
BeanFactoryafter it has set all bean properties and satisfied
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.