guava RemovalNotification

作者: 熊熊要更努力 | 来源:发表于2017-08-07 20:00 被阅读99次
  1. RemovalNotification
    删除单个条目的通知。
    如果key或者值已经被垃圾回收机制处理,则该值可能为null。
    无论缓存可能使用的引用类型如何,像与CacheBuilder相关的其他Map.Entry实例一样,该类保存对键和值的强引用。
函数 返回值 解释
equals(Object object) boolean 对象是否与要比较的对象相同
getCause() RemovalCause 返回对象被移除的原因
getKey() K 根据值返回对象
getValue() V 根据对象返回值
hashCode() int 返回对象的哈希码
setValue(V value) V
wasEvicted() boolean 如果由于换出而自动删除,则返回true(不是由于 RemovalCause.EXPLICIT 和 RemovalCause.REPLACED)

相关文章

网友评论

    本文标题:guava RemovalNotification

    本文链接:https://www.haomeiwen.com/subject/yifalxtx.html