net.sf.ehcache.Cache.isValueInCache()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中net.sf.ehcache.Cache.isValueInCache()方法的一些代码示例,展示了Cache.isValueInCache()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.isValueInCache()方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:isValueInCache

Cache.isValueInCache介绍

[英]An extremely expensive check to see if the value exists in the cache. This implementation is O(n). Ehcache is not designed for efficient access in this manner.

This method is not synchronized. It is possible that an element may exist in the cache and be removed before the check gets to it, or vice versa. Because it is slow to execute the probability of that this will have happened.
[中]一项非常昂贵的检查,以查看该值是否存在于缓存中。这个实现是O(n)。Ehcache不是为这种方式的高效访问而设计的。
此方法不同步。一个元素可能存在于缓存中,并在检查到达它之前被删除,反之亦然。因为执行的速度很慢,发生这种情况的可能性很小。

代码示例

代码示例来源:origin: apache/marmotta

@Override
public boolean containsValue(Object o) {
  return delegate.isValueInCache(o);
}

代码示例来源:origin: org.apache.marmotta/kiwi-caching-ehcache

@Override
public boolean containsValue(Object o) {
  return delegate.isValueInCache(o);
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public boolean containsValue(Object value) {
  return getCache().isValueInCache(value);
}

代码示例来源:origin: org.ujmp/ujmp-ehcache

public boolean containsValue(Object value) {
  return getCache().isValueInCache(value);
}

相关文章

微信公众号

最新文章

更多

Cache类方法