Package org.redisson.spring.cache
Class RedissonSpringCacheNativeManager
java.lang.Object
org.redisson.spring.cache.RedissonSpringCacheManager
org.redisson.spring.cache.RedissonSpringCacheNativeManager
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.cache.CacheManager
,org.springframework.context.ResourceLoaderAware
public class RedissonSpringCacheNativeManager
extends RedissonSpringCacheManager
implements org.springframework.cache.CacheManager, org.springframework.context.ResourceLoaderAware, org.springframework.beans.factory.InitializingBean
A
CacheManager
implementation
backed by Redisson instance.- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorDescriptionCreates CacheManager supplied by Redisson instanceRedissonSpringCacheNativeManager
(RedissonClient redisson, String configLocation) Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache name.RedissonSpringCacheNativeManager
(RedissonClient redisson, String configLocation, Codec codec) Creates CacheManager supplied by Redisson instance, Codec instance and Config location path.RedissonSpringCacheNativeManager
(RedissonClient redisson, Map<String, ? extends CacheConfig> config) Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache nameRedissonSpringCacheNativeManager
(RedissonClient redisson, Map<String, ? extends CacheConfig> config, Codec codec) Creates CacheManager supplied by Redisson instance, Codec instance and Cache config mapped by Cache name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
getMap
(String name, CacheConfig config) getMapCache
(String name, CacheConfig config) void
setConfig
(Map<String, ? extends CacheConfig> config) Set cache config mapped by cache nameMethods inherited from class org.redisson.spring.cache.RedissonSpringCacheManager
createDefaultConfig, getCache, getCacheNames, setAllowNullValues, setCacheNames, setCodec, setConfigLocation, setRedisson, setResourceLoader, setTransactionAware
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.cache.CacheManager
getCache, getCacheNames
Methods inherited from interface org.springframework.context.ResourceLoaderAware
setResourceLoader
-
Constructor Details
-
RedissonSpringCacheNativeManager
Creates CacheManager supplied by Redisson instance- Parameters:
redisson
- object
-
RedissonSpringCacheNativeManager
public RedissonSpringCacheNativeManager(RedissonClient redisson, Map<String, ? extends CacheConfig> config) Creates CacheManager supplied by Redisson instance and Cache config mapped by Cache name- Parameters:
redisson
- objectconfig
- object
-
RedissonSpringCacheNativeManager
public RedissonSpringCacheNativeManager(RedissonClient redisson, Map<String, ? extends CacheConfig> config, Codec codec) Creates CacheManager supplied by Redisson instance, Codec instance and Cache config mapped by Cache name.Each Cache instance share one Codec instance.
- Parameters:
redisson
- objectconfig
- objectcodec
- object
-
RedissonSpringCacheNativeManager
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").
- Parameters:
redisson
- objectconfigLocation
- path
-
RedissonSpringCacheNativeManager
public RedissonSpringCacheNativeManager(RedissonClient redisson, String configLocation, 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").
- Parameters:
redisson
- objectconfigLocation
- pathcodec
- object
-
-
Method Details
-
setConfig
Description copied from class:RedissonSpringCacheManager
Set cache config mapped by cache name- Overrides:
setConfig
in classRedissonSpringCacheManager
- Parameters:
config
- object
-
getMap
- Overrides:
getMap
in classRedissonSpringCacheManager
-
getMapCache
- Overrides:
getMapCache
in classRedissonSpringCacheManager
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classRedissonSpringCacheManager
- Throws:
Exception
-