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
ConstructorsConstructorDescriptionCreates 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 TypeMethodDescriptionvoidgetMap(String name, CacheConfig config) getMapCache(String name, CacheConfig config) voidsetConfig(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, setTransactionAwareMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.cache.CacheManager
getCache, getCacheNamesMethods 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:RedissonSpringCacheManagerSet cache config mapped by cache name- Overrides:
setConfigin classRedissonSpringCacheManager- Parameters:
config- object
-
getMap
- Overrides:
getMapin classRedissonSpringCacheManager
-
getMapCache
- Overrides:
getMapCachein classRedissonSpringCacheManager
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classRedissonSpringCacheManager- Throws:
Exception
-