类 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
-
字段概要
字段修饰符和类型字段说明private boolean(专用程序包) org.redisson.client.codec.Codec(专用程序包) String(专用程序包) Map<String,CacheConfig> private boolean(专用程序包) ConcurrentMap<String,cn.taketoday.cache.Cache> (专用程序包) org.redisson.api.RedissonClient(专用程序包) cn.taketoday.core.io.ResourceLoader -
构造器概要
构造器构造器说明RedissonCacheManager(org.redisson.api.RedissonClient redisson) Creates CacheManager supplied by Redisson instanceRedissonCacheManager(org.redisson.api.RedissonClient redisson, String configLocation) Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache name.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.RedissonCacheManager(org.redisson.api.RedissonClient redisson, Map<String, ? extends CacheConfig> config) Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache nameRedissonCacheManager(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. -
方法概要
修饰符和类型方法说明voidprotected CacheConfigprivate cn.taketoday.cache.CachecreateMap(String name, CacheConfig config) private cn.taketoday.cache.CachecreateMapCache(String name, CacheConfig config) cn.taketoday.cache.CachegetMap(String name, CacheConfig config) getMapCache(String name, CacheConfig config) voidsetAllowNullValues(boolean allowNullValues) Defines possibility of storingnullvalues.voidsetCacheNames(Collection<String> names) Defines 'fixed' cache names.voidsetCodec(org.redisson.client.codec.Codec codec) Set Codec instance shared between all Cache instancesvoidsetConfig(Map<String, ? extends CacheConfig> config) Set cache config mapped by cache namevoidsetConfigLocation(String configLocation) Set cache config locationvoidsetRedisson(org.redisson.api.RedissonClient redisson) Set Redisson instancevoidsetResourceLoader(cn.taketoday.core.io.ResourceLoader resourceLoader)
-
字段详细资料
-
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- objectconfig- 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- objectconfig- objectcodec- object
-
RedissonCacheManager
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- objectconfigLocation- 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- objectconfigLocation- pathcodec- object
-
-
方法详细资料
-
setAllowNullValues
public void setAllowNullValues(boolean allowNullValues) Defines possibility of storingnullvalues.Default is
true- 参数:
allowNullValues- - stores iftrue
-
setCacheNames
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
Set cache config location- 参数:
configLocation- object
-
setConfig
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
-
getCache
- 指定者:
getCache在接口中cn.taketoday.cache.CacheManager
-
createMap
-
getMap
-
createMapCache
-
getMapCache
-
getCacheNames
- 指定者:
getCacheNames在接口中cn.taketoday.cache.CacheManager
-
setResourceLoader
public void setResourceLoader(cn.taketoday.core.io.ResourceLoader resourceLoader) - 指定者:
setResourceLoader在接口中cn.taketoday.context.ResourceLoaderAware
-
afterPropertiesSet
- 指定者:
afterPropertiesSet在接口中cn.taketoday.beans.factory.InitializingBean- 抛出:
Exception
-