Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

93938: Merged BRANCHES/DEV/mward/post50_hbf_fixes to BRANCHES/DEV/HEAD-BUG-FIX:
      93561: Cache stats: Fixed concurrency issue with 'get' count. Added method to retrieve stats snapshot.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95014 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 15:26:15 +00:00
parent b6e2f3309f
commit 151537105d
5 changed files with 207 additions and 32 deletions

View File

@@ -18,6 +18,8 @@
*/
package org.alfresco.repo.cache;
import java.util.Map;
import org.alfresco.repo.cache.TransactionStats.OpType;
/**
@@ -63,5 +65,25 @@ public interface CacheStatistics
* @param cacheName The cache name.
* @return ratio (double)
*/
double hitMissRatio(String cacheName);
double hitMissRatio(String cacheName);
/**
* Retrieve the total number of get operations invoked on the
* cache (i.e. sum of hits and misses).
*
* @param cacheName The cache name.
* @return Count of get operations.
*/
long numGets(String cacheName);
/**
* Retrieve a map containing a snapshot of all of the raw stats
* (e.g. counts, mean operation times etc.). Since this is a snapshot
* it is unaffected by future modifications to the statistics - by
* using {@link CacheStatistics#add(String, TransactionStats)} for example.
*
* @param cacheName The cache name.
* @return Map of OpType to OperationStats
*/
Map<OpType, OperationStats> allStats(String cacheName);
}