类 RedissonCacheManager

java.lang.Object
cn.taketoday.cache.RedissonCacheManager
所有已实现的接口:
cn.taketoday.beans.factory.Aware, cn.taketoday.beans.factory.InitializingBean, cn.taketoday.cache.CacheManager, cn.taketoday.context.ResourceLoaderAware

public class RedissonCacheManager extends Object implements cn.taketoday.cache.CacheManager, cn.taketoday.context.ResourceLoaderAware, cn.taketoday.beans.factory.InitializingBean
A CacheManager implementation backed by Redisson instance.
作者:
Nikita Koksharov, TODAY
2018-12-24 19:06
  • 字段详细资料

    • resourceLoader

      cn.taketoday.core.io.ResourceLoader resourceLoader
    • dynamic

      private boolean dynamic
    • allowNullValues

      private boolean allowNullValues
    • codec

      org.redisson.client.codec.Codec codec
    • redisson

      org.redisson.api.RedissonClient redisson
    • configMap

      Map<String,CacheConfig> configMap
    • instanceMap

      ConcurrentMap<String,cn.taketoday.cache.Cache> instanceMap
    • configLocation

      String configLocation
  • 构造器详细资料

    • RedissonCacheManager

      public RedissonCacheManager(org.redisson.api.RedissonClient redisson)
      Creates CacheManager supplied by Redisson instance
      参数:
      redisson - object
    • RedissonCacheManager

      public RedissonCacheManager(org.redisson.api.RedissonClient redisson, Map<String,? extends CacheConfig> config)
      Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache name
      参数:
      redisson - object
      config - object
    • RedissonCacheManager

      public RedissonCacheManager(org.redisson.api.RedissonClient redisson, Map<String,? extends CacheConfig> config, org.redisson.client.codec.Codec codec)
      Creates CacheManager supplied by Redisson instance, Codec instance and Cache config mapped by Cache name.

      Each Cache instance share one Codec instance.

      参数:
      redisson - object
      config - object
      codec - object
    • RedissonCacheManager

      public RedissonCacheManager(org.redisson.api.RedissonClient redisson, String configLocation)
      Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache name.

      Loads the config file from the class path, interpreting plain paths as class path resource names that include the package path (e.g. "mypackage/myresource.txt").

      参数:
      redisson - object
      configLocation - path
    • RedissonCacheManager

      public RedissonCacheManager(org.redisson.api.RedissonClient redisson, String configLocation, org.redisson.client.codec.Codec codec)
      Creates CacheManager supplied by Redisson instance, Codec instance and Config location path.

      Each Cache instance share one Codec instance.

      Loads the config file from the class path, interpreting plain paths as class path resource names that include the package path (e.g. "mypackage/myresource.txt").

      参数:
      redisson - object
      configLocation - path
      codec - object
  • 方法详细资料

    • setAllowNullValues

      public void setAllowNullValues(boolean allowNullValues)
      Defines possibility of storing null values.

      Default is true

      参数:
      allowNullValues - - stores if true
    • setCacheNames

      public void setCacheNames(Collection<String> names)
      Defines 'fixed' cache names. A new cache instance will not be created in dynamic for non-defined names.

      `null` parameter setups dynamic mode

      参数:
      names - of caches
    • setConfigLocation

      public void setConfigLocation(String configLocation)
      Set cache config location
      参数:
      configLocation - object
    • setConfig

      public void setConfig(Map<String,? extends CacheConfig> config)
      Set cache config mapped by cache name
      参数:
      config - object
    • setRedisson

      public void setRedisson(org.redisson.api.RedissonClient redisson)
      Set Redisson instance
      参数:
      redisson - instance
    • setCodec

      public void setCodec(org.redisson.client.codec.Codec codec)
      Set Codec instance shared between all Cache instances
      参数:
      codec - object
    • createDefaultConfig

      protected CacheConfig createDefaultConfig()
    • getCache

      public cn.taketoday.cache.Cache getCache(String name)
      指定者:
      getCache 在接口中 cn.taketoday.cache.CacheManager
    • createMap

      private cn.taketoday.cache.Cache createMap(String name, CacheConfig config)
    • getMap

      protected org.redisson.api.RMap<Object,Object> getMap(String name, CacheConfig config)
    • createMapCache

      private cn.taketoday.cache.Cache createMapCache(String name, CacheConfig config)
    • getMapCache

      protected org.redisson.api.RMapCache<Object,Object> getMapCache(String name, CacheConfig config)
    • getCacheNames

      public Collection<String> getCacheNames()
      指定者:
      getCacheNames 在接口中 cn.taketoday.cache.CacheManager
    • setResourceLoader

      public void setResourceLoader(cn.taketoday.core.io.ResourceLoader resourceLoader)
      指定者:
      setResourceLoader 在接口中 cn.taketoday.context.ResourceLoaderAware
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      指定者:
      afterPropertiesSet 在接口中 cn.taketoday.beans.factory.InitializingBean
      抛出:
      Exception