@Override public Long getValue() { return cache.getStatistics().cacheHitCount(); } });
public Map<String, Object> getCacheRuntimeInformationAsJson(Cache cache) { LinkedHashMap<String, Object> json = new LinkedHashMap<>(); StatisticsGateway statistics = cache.getStatistics(); json.put("Get Time in milliseconds", getStatisticsFrom(statistics.cacheGetOperation())); json.put("Put Time in milliseconds", getStatisticsFrom(statistics.cachePutOperation())); json.put("Remove Time in milliseconds", getStatisticsFrom(statistics.cacheRemoveOperation())); json.put("Cache Size", statistics.getSize()); LinkedHashMap<String, Long> cacheCount = new LinkedHashMap<>(); cacheCount.put("Hits", statistics.cacheHitCount()); cacheCount.put("Miss", statistics.cacheMissCount()); cacheCount.put("Expired", statistics.cacheExpiredCount()); cacheCount.put("Eviction", statistics.cacheEvictedCount()); cacheCount.put("Put", statistics.cachePutCount()); cacheCount.put("Remove", statistics.cacheRemoveCount()); json.put("Cache Counts", cacheCount); json.put("Cache Size (Disk)", statistics.getLocalDiskSize()); json.put("Cache Count (Disk)", statistics.localDiskHitCount()); return json; }
/** * {@inheritDoc} */ @Override public long getCacheHits() { return statistics.cacheHitCount(); } }
/** * {@inheritDoc} */ public long getCacheHitCount() { long count = 0; for (String name : cacheManager.getCacheNames()) { Cache cache = cacheManager.getCache(name); if (cache != null) { count += cache.getStatistics().cacheHitCount(); } } return count; }
/** * {@inheritDoc} */ public double getCacheHitPercentage() { long hits = statistics.cacheHitCount(); long misses = statistics.cacheMissCount(); long total = hits + misses; return getPercentage(hits, total); }
/** * {@inheritDoc} */ public double getCacheMissPercentage() { long hits = statistics.cacheHitCount(); long misses = statistics.cacheMissCount(); long total = hits + misses; return getPercentage(misses, total); }
/** * {@inheritDoc} */ @Override public long getCacheHitCount() { try { return cache.getStatistics().cacheHitCount(); } catch (RuntimeException e) { throw Utils.newPlainException(e); } }
/** * {@inheritDoc} */ @Override public long getCacheHits() { return statistics.cacheHitCount(); } }
/** * {@inheritDoc} */ @Override public long getCacheHits() { return statistics.cacheHitCount(); } }
@Override public Long getValue() { return cache.getStatistics().cacheHitCount(); } });
/** * {@inheritDoc} */ public long getCacheHitCount() { long count = 0; for (String name : cacheManager.getCacheNames()) { Cache cache = cacheManager.getCache(name); if (cache != null) { count += cache.getStatistics().cacheHitCount(); } } return count; }
/** * {@inheritDoc} */ public double getCacheHitPercentage() { long hits = statistics.cacheHitCount(); long misses = statistics.cacheMissCount(); long total = hits + misses; return getPercentage(hits, total); }
/** * {@inheritDoc} */ public double getCacheHitPercentage() { long hits = statistics.cacheHitCount(); long misses = statistics.cacheMissCount(); long total = hits + misses; return getPercentage(hits, total); }
/** * {@inheritDoc} */ public double getCacheMissPercentage() { long hits = statistics.cacheHitCount(); long misses = statistics.cacheMissCount(); long total = hits + misses; return getPercentage(misses, total); }
/** * {@inheritDoc} */ @Override public long getCacheHitCount() { try { return cache.getStatistics().cacheHitCount(); } catch (RuntimeException e) { throw Utils.newPlainException(e); } }
/** * {@inheritDoc} */ public double getCacheMissPercentage() { long hits = statistics.cacheHitCount(); long misses = statistics.cacheMissCount(); long total = hits + misses; return getPercentage(misses, total); }
@Override public float getCacheHitPercentage() { final double v = getEhcache().getStatistics().cacheHitRatio(); if(Double.isNaN(v)) { return getEhcache().getStatistics().cacheHitCount() == 0 ? 0f : 100f; } return (float) v * 100; }
@Override public float getCacheHitPercentage() { final double v = getEhcache().getStatistics().cacheHitRatio(); if(Double.isNaN(v)) { return getEhcache().getStatistics().cacheHitCount() == 0 ? 0f : 100f; } return (float) v * 100; }
@Override public void clear() { pCacheHits = getEhcache().getStatistics().cacheHitCount(); pCacheMisses = getEhcache().getStatistics().cacheMissCount(); pCacheGets = getEhcache().getStatistics().cacheGetOperation().count().value(); pCachePuts = getEhcache().getStatistics().cachePutCount(); pCacheRemovals = getEhcache().getStatistics().cacheRemoveCount(); pCacheEvictions = getEhcache().getStatistics().cacheEvictedCount(); }
@Override public void clear() { pCacheHits = getEhcache().getStatistics().cacheHitCount(); pCacheMisses = getEhcache().getStatistics().cacheMissCount(); pCacheGets = getEhcache().getStatistics().cacheGetOperation().count().value(); pCachePuts = getEhcache().getStatistics().cachePutCount(); pCacheRemovals = getEhcache().getStatistics().cacheRemoveCount(); pCacheEvictions = getEhcache().getStatistics().cacheEvictedCount(); }