public class JCacheCacheManager extends AbstractTransactionSupportingCacheManager
CacheManager
implementation
backed by a JCache javax.cache.CacheManager
.
Note: This class has been updated for JCache 1.0, as of Spring 4.0.
JCacheCache
Constructor and Description |
---|
JCacheCacheManager()
Create a new
JCacheCacheManager without a backing JCache
javax.cache.CacheManager . |
JCacheCacheManager(javax.cache.CacheManager cacheManager)
Create a new
JCacheCacheManager for the given backing JCache
javax.cache.CacheManager . |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
javax.cache.CacheManager |
getCacheManager()
Return the backing JCache
javax.cache.CacheManager . |
protected org.springframework.cache.Cache |
getMissingCache(String name) |
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
javax.cache.CacheManager . |
decorateCache, isTransactionAware, setTransactionAware
public JCacheCacheManager()
JCacheCacheManager
without a backing JCache
javax.cache.CacheManager
.
The backing JCache javax.cache.CacheManager
can be set via the
setCacheManager(javax.cache.CacheManager)
bean property.
public JCacheCacheManager(javax.cache.CacheManager cacheManager)
JCacheCacheManager
for the given backing JCache
javax.cache.CacheManager
.cacheManager
- the backing JCache javax.cache.CacheManager
public void setCacheManager(@Nullable javax.cache.CacheManager cacheManager)
javax.cache.CacheManager
.@Nullable public javax.cache.CacheManager getCacheManager()
javax.cache.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 null
s.
public boolean isAllowNullValues()
null
values
for all of its caches.public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.cache.support.AbstractCacheManager
protected Collection<org.springframework.cache.Cache> loadCaches()
loadCaches
in class org.springframework.cache.support.AbstractCacheManager
protected org.springframework.cache.Cache getMissingCache(String name)
getMissingCache
in class org.springframework.cache.support.AbstractCacheManager