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>
FactoryBean
that returns a different CacheStoreAdapter
depending on
the value of a flag property
that indicates if caching should be turned on or off.- Author:
- Alfonso Vásquez
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<?>
boolean
void
setCacheOn
(boolean cacheOn) void
setOffCacheStoreAdapter
(CacheStoreAdapter offCacheStoreAdapter) void
setOnCacheStoreAdapter
(CacheStoreAdapter onCacheStoreAdapter)
-
Constructor Details
-
SwitchableCacheStoreAdapterFactoryBean
public SwitchableCacheStoreAdapterFactoryBean()
-
-
Method Details
-
setOffCacheStoreAdapter
-
setOnCacheStoreAdapter
-
setCacheOn
public void setCacheOn(boolean cacheOn) -
getObject
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
- Throws:
Exception
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
-