Class RedisCacheHandler

java.lang.Object
net.ideahut.springboot.cache.RedisCacheHandler
All Implemented Interfaces:
net.ideahut.springboot.cache.CacheHandler, org.springframework.beans.factory.InitializingBean

public class RedisCacheHandler extends Object implements net.ideahut.springboot.cache.CacheHandler, org.springframework.beans.factory.InitializingBean
  • Constructor Details

    • RedisCacheHandler

      public RedisCacheHandler()
  • Method Details

    • setPrefix

      public RedisCacheHandler setPrefix(String prefix)
    • setNullable

      public RedisCacheHandler setNullable(Boolean nullable)
    • setLimit

      public RedisCacheHandler setLimit(Integer limit)
    • setRedisTemplate

      public RedisCacheHandler setRedisTemplate(org.springframework.data.redis.core.RedisTemplate<String,byte[]> redisTemplate)
    • setDataMapper

      public RedisCacheHandler setDataMapper(DataMapper dataMapper)
    • setTaskHandler

      public RedisCacheHandler setTaskHandler(net.ideahut.springboot.task.TaskHandler taskHandler)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • info

      public net.ideahut.springboot.cache.CacheInfo info()
      Specified by:
      info in interface net.ideahut.springboot.cache.CacheHandler
    • get

      public <T> T get(Class<T> type, String key, Callable<T> callable)
      Specified by:
      get in interface net.ideahut.springboot.cache.CacheHandler
    • get

      public <T> T get(Class<T> type, String key)
      Specified by:
      get in interface net.ideahut.springboot.cache.CacheHandler
    • multiList

      public <T> List<T> multiList(Class<T> type, Collection<String> keys)
      Specified by:
      multiList in interface net.ideahut.springboot.cache.CacheHandler
    • multiMap

      public <T> Map<String,T> multiMap(Class<T> type, Collection<String> keys)
      Specified by:
      multiMap in interface net.ideahut.springboot.cache.CacheHandler
    • put

      public <T> T put(Class<T> type, String key, T value)
      Specified by:
      put in interface net.ideahut.springboot.cache.CacheHandler
    • expire

      public void expire(String key, Integer expiry)
      Specified by:
      expire in interface net.ideahut.springboot.cache.CacheHandler
    • delete

      public void delete(String key)
      Specified by:
      delete in interface net.ideahut.springboot.cache.CacheHandler
    • multiDel

      public void multiDel(Collection<String> keys)
      Specified by:
      multiDel in interface net.ideahut.springboot.cache.CacheHandler
    • size

      public Long size()
      Specified by:
      size in interface net.ideahut.springboot.cache.CacheHandler
    • clear

      public void clear()
      Specified by:
      clear in interface net.ideahut.springboot.cache.CacheHandler
    • keys

      public List<String> keys()
      Specified by:
      keys in interface net.ideahut.springboot.cache.CacheHandler