Package org.springframework.cache.jcache
Class JCacheManagerFactoryBean
java.lang.Object
org.springframework.cache.jcache.JCacheManagerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>,org.springframework.beans.factory.InitializingBean
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.
- Since:
- 3.2
- Author:
- Juergen Hoeller
- See Also:
-
Caching.getCachingProvider()CachingProvider.getCacheManager()
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()javax.cache.CacheManagerClass<?>booleanvoidsetBeanClassLoader(ClassLoader classLoader) voidsetCacheManagerProperties(Properties cacheManagerProperties) Specify properties for the to-be-createdCacheManager.voidsetCacheManagerUri(URI cacheManagerUri) Specify the URI for the desiredCacheManager.
-
Constructor Details
-
JCacheManagerFactoryBean
public JCacheManagerFactoryBean()
-
-
Method Details
-
setCacheManagerUri
Specify the URI for the desiredCacheManager.Default is
null(i.e. JCache's default). -
setCacheManagerProperties
Specify properties for the to-be-createdCacheManager.Default is
null(i.e. no special properties to apply).- See Also:
-
CachingProvider.getCacheManager(URI, ClassLoader, Properties)
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getObject
@Nullable public javax.cache.CacheManager getObject()- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-