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

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

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

Cache.isElementInMemory介绍

[英]Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.

Since no assertions are made about the state of the Element it is possible that the Element is expired, but this method still returns true.
[中]元素是否存储在内存缓存中,表示检索成本非常低。
由于没有关于元素状态的断言,因此元素可能已过期,但此方法仍然返回true。

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.
 * <p>
 * Since no assertions are made about the state of the Element it is possible that the
 * Element is expired, but this method still returns true.
 *
 * @return true if an element matching the key is found in memory
 */
public final boolean isElementInMemory(Serializable key) {
  return isElementInMemory((Object) key);
}

代码示例来源:origin: geotools/geotools

if (ehcache.isElementInMemory(file)) {
  final Element element = ehcache.get(file);
  if (element != null) {

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.
 * <p>
 * Since no assertions are made about the state of the Element it is possible that the
 * Element is expired, but this method still returns true.
 *
 * @return true if an element matching the key is found in memory
 */
public final boolean isElementInMemory(Serializable key) {
  return isElementInMemory((Object) key);
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.
 * <p>
 * Since no assertions are made about the state of the Element it is possible that the
 * Element is expired, but this method still returns true.
 *
 * @return true if an element matching the key is found in memory
 */
public final boolean isElementInMemory(Serializable key) {
  return isElementInMemory((Object) key);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Whether an Element is stored in the cache in Memory, indicating a very low cost of retrieval.
 * <p>
 * Since no assertions are made about the state of the Element it is possible that the
 * Element is expired, but this method still returns true.
 *
 * @return true if an element matching the key is found in memory
 */
public final boolean isElementInMemory(Serializable key) {
  return isElementInMemory((Object) key);
}

代码示例来源:origin: org.geotools/gt-imagemosaic

if (ehcache.isElementInMemory(file)){
  final Element element = ehcache.get(file);
  if (element != null){

相关文章

微信公众号

最新文章

更多

Cache类方法