public class JCacheManagerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
FactoryBean
for a JCache javax.cache.CacheManager
,
obtaining a pre-defined CacheManager
by name through the standard
JCache javax.cache.Caching
class.
Note: This class has been updated for JCache 1.0, as of Spring 4.0.
Caching.getCachingProvider()
,
CachingProvider.getCacheManager()
Constructor and Description |
---|
JCacheManagerFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
javax.cache.CacheManager |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setCacheManagerProperties(Properties cacheManagerProperties)
Specify properties for the to-be-created
CacheManager . |
void |
setCacheManagerUri(URI cacheManagerUri)
Specify the URI for the desired
CacheManager . |
public void setCacheManagerUri(@Nullable URI cacheManagerUri)
CacheManager
.
Default is null
(i.e. JCache's default).
public void setCacheManagerProperties(@Nullable Properties cacheManagerProperties)
CacheManager
.
Default is null
(i.e. no special properties to apply).
CachingProvider.getCacheManager(URI, ClassLoader, Properties)
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
@Nullable public javax.cache.CacheManager getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean