类 J2Cache

java.lang.Object
org.tio.utils.cache.AbsCache
org.tio.utils.cache.j2cache.J2Cache
所有已实现的接口:
ICache

public class J2Cache extends AbsCache
红薯家的j2cache
作者:
tanyaowu
  • 构造器详细资料

    • J2Cache

      public J2Cache(String cacheName)
  • 方法详细资料

    • clear

      public void clear()
      从接口复制的说明: ICache
      清空所有缓存
    • _get

      public Serializable _get(String key)
      指定者:
      _get 在类中 AbsCache
    • keys

      public Collection<String> keys()
      从接口复制的说明: ICache
      获取所有的key
      返回:
    • put

      public void put(String key, Serializable value)
      从接口复制的说明: ICache
      将key value保存到缓存中
    • remove

      public void remove(String key)
      从接口复制的说明: ICache
      删除一个key
    • putTemporary

      public void putTemporary(String key, Serializable value)
      从接口复制的说明: ICache
      临时添加一个值,用于防止缓存穿透攻击
    • ttl

      public long ttl(String key)
      从接口复制的说明: ICache
      对象还会存活多久。
      返回:
      currTime in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.