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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
javax.cache.CacheManager
Class<?>
boolean
void
setBeanClassLoader
(ClassLoader classLoader) void
setCacheManagerProperties
(Properties cacheManagerProperties) Specify properties for the to-be-createdCacheManager
.void
setCacheManagerUri
(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:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
getObject
@Nullable public javax.cache.CacheManager getObject()- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>
-
destroy
public void destroy()- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-