java.lang.Object
org.cruk.clarity.api.cache.EhCacheManagerFactory
- All Implemented Interfaces:
FactoryBean<CacheManager>
Factory for creating a singleton EhCache 3
CacheManager from
XML configuration.- Since:
- 2.31
- See Also:
-
Field Summary
FieldsFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClose the cache manager.voidCreate and initialise the cache manager by reading the configuration XML file.Class<? extends CacheManager>booleanvoidsetConfigLocation(Resource configLocation) Set the location of the EhCache config file.
-
Field Details
-
logger
-
-
Constructor Details
-
EhCacheManagerFactory
public EhCacheManagerFactory()Constructor.
-
-
Method Details
-
setConfigLocation
Set the location of the EhCache config file.- Parameters:
configLocation- The location of the EhCache XML configuration file.
-
createCacheManager
Create and initialise the cache manager by reading the configuration XML file.- Throws:
IOException- if the location cannot be resolved into a URL.StateTransitionException- if theCacheManagercould not be made.- See Also:
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<CacheManager>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<CacheManager>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<CacheManager>
-
closeCacheManager
Close the cache manager.
-