Class RedisCache

java.lang.Object
org.mybatis.caches.redis.RedisCache
All Implemented Interfaces:
org.apache.ibatis.cache.Cache

public final class RedisCache extends Object implements org.apache.ibatis.cache.Cache
Cache adapter for Redis.
Author:
Eduardo Macarron
  • Constructor Details

    • RedisCache

      public RedisCache(String id)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.apache.ibatis.cache.Cache
    • getSize

      public int getSize()
      Specified by:
      getSize in interface org.apache.ibatis.cache.Cache
    • putObject

      public void putObject(Object key, Object value)
      Specified by:
      putObject in interface org.apache.ibatis.cache.Cache
    • getObject

      public Object getObject(Object key)
      Specified by:
      getObject in interface org.apache.ibatis.cache.Cache
    • removeObject

      public Object removeObject(Object key)
      Specified by:
      removeObject in interface org.apache.ibatis.cache.Cache
    • clear

      public void clear()
      Specified by:
      clear in interface org.apache.ibatis.cache.Cache
    • getReadWriteLock

      public ReadWriteLock getReadWriteLock()
      Specified by:
      getReadWriteLock in interface org.apache.ibatis.cache.Cache
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setTimeout

      public void setTimeout(Integer timeout)