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
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the cache manager.void
Create and initialise the cache manager by reading the configuration XML file.Class<? extends CacheManager>
boolean
void
setConfigLocation
(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 theCacheManager
could not be made.- See Also:
-
getObject
- Specified by:
getObject
in interfaceFactoryBean<CacheManager>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<CacheManager>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceFactoryBean<CacheManager>
-
closeCacheManager
Close the cache manager.
-