Examples of SampledCacheStatistics


Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public Map<String, long[]> getCacheMetrics() {
        Map<String, long[]> result = new HashMap<String, long[]>();
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result.put(cacheName, new long[] {stats.getCacheHitMostRecentSample(),
                        stats.getCacheMissNotFoundMostRecentSample()
                        + stats.getCacheMissExpiredMostRecentSample(),
                        stats.getCacheElementPutMostRecentSample(), });
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheHitRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getCacheHitMostRecentSample();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheMissRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += (stats.getCacheMissNotFoundMostRecentSample()
                    + stats.getCacheMissExpiredMostRecentSample());
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCachePutRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getCacheElementPutMostRecentSample();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheUpdateRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getCacheElementUpdatedMostRecentSample();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheEvictionRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getCacheElementEvictedMostRecentSample();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheExpirationRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getCacheElementExpiredMostRecentSample();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheSearchRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getSearchesPerSecond();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getCacheAverageSearchTime() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getAverageSearchTime();
            }
        }
        return result;
    }
View Full Code Here

Examples of net.sf.ehcache.statistics.sampled.SampledCacheStatistics

    public long getTransactionCommitRate() {
        long result = 0;
        for (String cacheName : getCacheNames()) {
            Ehcache cache = cacheManager.getEhcache(cacheName);
            if (cache != null) {
                SampledCacheStatistics stats = cache.getSampledCacheStatistics();
                result += stats.getCacheXaCommitsMostRecentSample();
            }
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.