Class TTLRedisCacheWriterWrapper
- java.lang.Object
-
- io.microsphere.spring.cache.redis.TTLRedisCacheWriterWrapper
-
- All Implemented Interfaces:
org.springframework.data.redis.cache.CacheStatisticsProvider
,org.springframework.data.redis.cache.RedisCacheWriter
public class TTLRedisCacheWriterWrapper extends java.lang.Object implements org.springframework.data.redis.cache.RedisCacheWriter
TTLRedisCacheWriter
Wrapper- Since:
- 1.0.0
- Author:
- Mercy
-
-
Constructor Summary
Constructors Constructor Description TTLRedisCacheWriterWrapper(org.springframework.data.redis.cache.RedisCacheWriter delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean(java.lang.String name, byte[] pattern)
void
clearStatistics(java.lang.String name)
byte[]
get(java.lang.String name, byte[] key)
org.springframework.data.redis.cache.CacheStatistics
getCacheStatistics(java.lang.String cacheName)
void
put(java.lang.String name, byte[] key, byte[] value, java.time.Duration ttl)
byte[]
putIfAbsent(java.lang.String name, byte[] key, byte[] value, java.time.Duration ttl)
void
remove(java.lang.String name, byte[] key)
org.springframework.data.redis.cache.RedisCacheWriter
withStatisticsCollector(org.springframework.data.redis.cache.CacheStatisticsCollector cacheStatisticsCollector)
-
-
-
Method Detail
-
put
public void put(java.lang.String name, byte[] key, byte[] value, java.time.Duration ttl)
- Specified by:
put
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
get
@Nullable public byte[] get(java.lang.String name, byte[] key)
- Specified by:
get
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
putIfAbsent
@Nullable public byte[] putIfAbsent(java.lang.String name, byte[] key, byte[] value, java.time.Duration ttl)
- Specified by:
putIfAbsent
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
remove
public void remove(java.lang.String name, byte[] key)
- Specified by:
remove
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
clean
public void clean(java.lang.String name, byte[] pattern)
- Specified by:
clean
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
clearStatistics
public void clearStatistics(java.lang.String name)
- Specified by:
clearStatistics
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
withStatisticsCollector
public org.springframework.data.redis.cache.RedisCacheWriter withStatisticsCollector(org.springframework.data.redis.cache.CacheStatisticsCollector cacheStatisticsCollector)
- Specified by:
withStatisticsCollector
in interfaceorg.springframework.data.redis.cache.RedisCacheWriter
-
getCacheStatistics
public org.springframework.data.redis.cache.CacheStatistics getCacheStatistics(java.lang.String cacheName)
- Specified by:
getCacheStatistics
in interfaceorg.springframework.data.redis.cache.CacheStatisticsProvider
-
-