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

x33g5p2x  于2022-01-19 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(106)

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

Ehcache.getLiveCacheStatistics介绍

[英]This is different from #getStatistics() in the way that values returned from LiveCacheStatistics will reflect the current state of the cache (and not a snapshot of the cache when the api's were called like #getStatistics())
[中]这与#getStatistics()的不同之处在于,从LiveCacheStatistics返回的值将反映缓存的当前状态(而不是像#getStatistics()一样调用api时缓存的快照)

代码示例

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

@Override
  public Long getValue() {
    return cache.getLiveCacheStatistics().getLocalDiskSizeInBytes() +
        cache.getLiveCacheStatistics().getLocalHeapSizeInBytes() +
        cache.getLiveCacheStatistics().getLocalOffHeapSizeInBytes();
  }
});

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

@Override
  public Long getValue() {
    return cache.getLiveCacheStatistics().getSize();
  }
});

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

/**
 * {@inheritDoc}
 */
public long getInMemoryMissCount() {
  try {
    return cache.getLiveCacheStatistics().getInMemoryMissCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getLocalOffHeapSizeInBytes() {
  try {
    return cache.getLiveCacheStatistics().getLocalOffHeapSizeInBytes();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getPutCount() {
  try {
    return cache.getLiveCacheStatistics().getPutCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getCacheHitCount() {
  try {
    return cache.getLiveCacheStatistics().getCacheHitCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getEvictedCount() {
  try {
    return cache.getLiveCacheStatistics().getEvictedCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getLocalDiskSize() {
  try {
    return cache.getLiveCacheStatistics().getLocalDiskSize();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getLocalHeapSize() {
  try {
    return cache.getLiveCacheStatistics().getLocalHeapSize();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getLocalHeapSizeInBytes() {
  try {
    return cache.getLiveCacheStatistics().getLocalHeapSizeInBytes();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getSize() {
  try {
    return cache.getLiveCacheStatistics().getSize();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getXaRollbackCount() {
  try {
    return cache.getLiveCacheStatistics().getXaRollbackCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getWriterQueueLength() {
  try {
    return cache.getLiveCacheStatistics().getWriterQueueLength();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getCacheMissCount() {
  try {
    return cache.getLiveCacheStatistics().getCacheMissCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getOffHeapMissCount() {
  try {
    return cache.getLiveCacheStatistics().getOffHeapMissCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getOnDiskMissCount() {
  try {
    return cache.getLiveCacheStatistics().getOnDiskMissCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getExpiredCount() {
  try {
    return cache.getLiveCacheStatistics().getExpiredCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getCacheMissCountExpired() {
  try {
    return cache.getLiveCacheStatistics().getCacheMissCountExpired();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getLocalDiskSizeInBytes() {
  try {
    return cache.getLiveCacheStatistics().getLocalDiskSizeInBytes();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

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

/**
 * {@inheritDoc}
 */
public long getRemovedCount() {
  try {
    return cache.getLiveCacheStatistics().getRemovedCount();
  } catch (RuntimeException e) {
    throw Utils.newPlainException(e);
  }
}

相关文章

微信公众号

最新文章

更多

Ehcache类方法