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.| Constructor and Description |
|---|
SwitchableCacheStoreAdapterFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
CacheStoreAdapter |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setCacheOn(boolean cacheOn) |
void |
setOffCacheStoreAdapter(CacheStoreAdapter offCacheStoreAdapter) |
void |
setOnCacheStoreAdapter(CacheStoreAdapter onCacheStoreAdapter) |
public SwitchableCacheStoreAdapterFactoryBean()
public void setOffCacheStoreAdapter(CacheStoreAdapter offCacheStoreAdapter)
public void setOnCacheStoreAdapter(CacheStoreAdapter onCacheStoreAdapter)
public void setCacheOn(boolean cacheOn)
public CacheStoreAdapter getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>Exceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>Copyright © 2018 CrafterCMS. All rights reserved.