Class 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
    • Constructor Detail

      • SwitchableCacheStoreAdapterFactoryBean

        public SwitchableCacheStoreAdapterFactoryBean()
    • Method Detail

      • setOffCacheStoreAdapter

        public void setOffCacheStoreAdapter​(CacheStoreAdapter offCacheStoreAdapter)
      • setOnCacheStoreAdapter

        public void setOnCacheStoreAdapter​(CacheStoreAdapter onCacheStoreAdapter)
      • setCacheOn

        public void setCacheOn​(boolean cacheOn)
      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean<CacheStoreAdapter>