public class JCacheCacheManager extends AbstractTransactionSupportingCacheManager
CacheManager implementation
backed by a JCache CacheManager.
Note: This class has been updated for JCache 1.0, as of Spring 4.0.
| Constructor and Description |
|---|
JCacheCacheManager()
Create a new JCacheCacheManager, setting the target JCache CacheManager
through the
setCacheManager(javax.cache.CacheManager) bean property. |
JCacheCacheManager(javax.cache.CacheManager cacheManager)
Create a new JCacheCacheManager for the given backing JCache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.springframework.cache.Cache |
getCache(String name) |
javax.cache.CacheManager |
getCacheManager()
Return the backing JCache
CacheManager. |
boolean |
isAllowNullValues()
Return whether this cache manager accepts and converts
null values
for all of its caches. |
protected Collection<org.springframework.cache.Cache> |
loadCaches() |
void |
setAllowNullValues(boolean allowNullValues)
Specify whether to accept and convert
null values for all caches
in this cache manager. |
void |
setCacheManager(javax.cache.CacheManager cacheManager)
Set the backing JCache
CacheManager. |
decorateCache, isTransactionAware, setTransactionAwarepublic JCacheCacheManager()
setCacheManager(javax.cache.CacheManager) bean property.public JCacheCacheManager(javax.cache.CacheManager cacheManager)
cacheManager - the backing JCache CacheManagerpublic void setCacheManager(javax.cache.CacheManager cacheManager)
CacheManager.public javax.cache.CacheManager getCacheManager()
CacheManager.public void setAllowNullValues(boolean allowNullValues)
null values for all caches
in this cache manager.
Default is "true", despite JSR-107 itself not supporting null values.
An internal holder object will be used to store user-level nulls.
public boolean isAllowNullValues()
null values
for all of its caches.public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.cache.support.AbstractCacheManagerprotected Collection<org.springframework.cache.Cache> loadCaches()
loadCaches in class org.springframework.cache.support.AbstractCacheManagerpublic org.springframework.cache.Cache getCache(String name)
getCache in interface org.springframework.cache.CacheManagergetCache in class org.springframework.cache.support.AbstractCacheManager