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

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

本文整理了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

  1. @Override
  2. public Long getValue() {
  3. return cache.getLiveCacheStatistics().getLocalDiskSizeInBytes() +
  4. cache.getLiveCacheStatistics().getLocalHeapSizeInBytes() +
  5. cache.getLiveCacheStatistics().getLocalOffHeapSizeInBytes();
  6. }
  7. });

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

  1. @Override
  2. public Long getValue() {
  3. return cache.getLiveCacheStatistics().getSize();
  4. }
  5. });

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getInMemoryMissCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getInMemoryMissCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getLocalOffHeapSizeInBytes() {
  5. try {
  6. return cache.getLiveCacheStatistics().getLocalOffHeapSizeInBytes();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getPutCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getPutCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getCacheHitCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getCacheHitCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getEvictedCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getEvictedCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getLocalDiskSize() {
  5. try {
  6. return cache.getLiveCacheStatistics().getLocalDiskSize();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getLocalHeapSize() {
  5. try {
  6. return cache.getLiveCacheStatistics().getLocalHeapSize();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getLocalHeapSizeInBytes() {
  5. try {
  6. return cache.getLiveCacheStatistics().getLocalHeapSizeInBytes();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getSize() {
  5. try {
  6. return cache.getLiveCacheStatistics().getSize();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getXaRollbackCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getXaRollbackCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getWriterQueueLength() {
  5. try {
  6. return cache.getLiveCacheStatistics().getWriterQueueLength();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getCacheMissCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getCacheMissCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getOffHeapMissCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getOffHeapMissCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getOnDiskMissCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getOnDiskMissCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getExpiredCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getExpiredCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getCacheMissCountExpired() {
  5. try {
  6. return cache.getLiveCacheStatistics().getCacheMissCountExpired();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getLocalDiskSizeInBytes() {
  5. try {
  6. return cache.getLiveCacheStatistics().getLocalDiskSizeInBytes();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public long getRemovedCount() {
  5. try {
  6. return cache.getLiveCacheStatistics().getRemovedCount();
  7. } catch (RuntimeException e) {
  8. throw Utils.newPlainException(e);
  9. }
  10. }

相关文章

Ehcache类方法