public class JCacheManagerFactoryBean
extends java.lang.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 CacheManager
,
obtaining a pre-defined CacheManager by name through the standard
JCache 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() |
java.lang.Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader) |
void |
setCacheManagerProperties(java.util.Properties cacheManagerProperties)
Specify properties for the to-be-created CacheManager.
|
void |
setCacheManagerUri(java.net.URI cacheManagerUri)
Specify the URI for the desired CacheManager.
|
public void setCacheManagerUri(@Nullable java.net.URI cacheManagerUri)
null
(i.e. JCache's default).public void setCacheManagerProperties(@Nullable java.util.Properties cacheManagerProperties)
null
(i.e. no special properties to apply).CachingProvider.getCacheManager(URI, ClassLoader, Properties)
public void setBeanClassLoader(java.lang.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 java.lang.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