Class SwitchableCacheStoreAdapterFactoryBean
- java.lang.Object
-
- org.craftercms.core.cache.impl.store.SwitchableCacheStoreAdapterFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
public class SwitchableCacheStoreAdapterFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
FactoryBeanthat returns a differentCacheStoreAdapterdepending on the value of a flag property that indicates if caching should be turned on or off.- Author:
- Alfonso Vásquez
-
-
Constructor Summary
Constructors Constructor Description SwitchableCacheStoreAdapterFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheStoreAdaptergetObject()Class<?>getObjectType()booleanisSingleton()voidsetCacheOn(boolean cacheOn)voidsetOffCacheStoreAdapter(CacheStoreAdapter offCacheStoreAdapter)voidsetOnCacheStoreAdapter(CacheStoreAdapter onCacheStoreAdapter)
-
-
-
Method Detail
-
setOffCacheStoreAdapter
public void setOffCacheStoreAdapter(CacheStoreAdapter offCacheStoreAdapter)
-
setOnCacheStoreAdapter
public void setOnCacheStoreAdapter(CacheStoreAdapter onCacheStoreAdapter)
-
setCacheOn
public void setCacheOn(boolean cacheOn)
-
getObject
public CacheStoreAdapter getObject() throws Exception
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<CacheStoreAdapter>- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
-
-