Class 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
    TTL RedisCacheWriter 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TTLRedisCacheWriterWrapper

        public TTLRedisCacheWriterWrapper​(org.springframework.data.redis.cache.RedisCacheWriter delegate)
    • Method Detail

      • put

        public void put​(java.lang.String name,
                        byte[] key,
                        byte[] value,
                        java.time.Duration ttl)
        Specified by:
        put in interface org.springframework.data.redis.cache.RedisCacheWriter
      • get

        @Nullable
        public byte[] get​(java.lang.String name,
                          byte[] key)
        Specified by:
        get in interface org.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 interface org.springframework.data.redis.cache.RedisCacheWriter
      • remove

        public void remove​(java.lang.String name,
                           byte[] key)
        Specified by:
        remove in interface org.springframework.data.redis.cache.RedisCacheWriter
      • clean

        public void clean​(java.lang.String name,
                          byte[] pattern)
        Specified by:
        clean in interface org.springframework.data.redis.cache.RedisCacheWriter
      • clearStatistics

        public void clearStatistics​(java.lang.String name)
        Specified by:
        clearStatistics in interface org.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 interface org.springframework.data.redis.cache.RedisCacheWriter
      • getCacheStatistics

        public org.springframework.data.redis.cache.CacheStatistics getCacheStatistics​(java.lang.String cacheName)
        Specified by:
        getCacheStatistics in interface org.springframework.data.redis.cache.CacheStatisticsProvider