public class InMemoryCacheStatistics extends Object implements CacheStatistics, org.springframework.context.ApplicationContextAware
CacheStatistics. Statistics
are empty at repository startup.| Constructor and Description |
|---|
InMemoryCacheStatistics() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String cacheName,
TransactionStats txStats)
Add new details to the system wide cache statistics.
|
Map<TransactionStats.OpType,OperationStats> |
allStats(String cacheName)
Retrieve a map containing a snapshot of all of the raw stats
(e.g.
|
long |
count(String cacheName,
TransactionStats.OpType opType)
Get the number of occurrences of the given operation type,
retrieve the number of cache hits that have happened to the cache.
|
double |
hitMissRatio(String cacheName)
The hit ratio for the given cache, where 1.0 is the maximum possible
value and 0.0 represents a cache that has never successfully
returned a previously cached value.
|
double |
meanTime(String cacheName,
TransactionStats.OpType opType)
The mean time in nanoseconds for all operations of the given type.
|
long |
numGets(String cacheName)
Retrieve the total number of get operations invoked on the
cache (i.e.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public long count(String cacheName, TransactionStats.OpType opType)
CacheStatisticscount in interface CacheStatisticscacheName - Name of the cache.opType - Type of cache operation.public double meanTime(String cacheName, TransactionStats.OpType opType)
CacheStatisticsmeanTime in interface CacheStatisticscacheName - The cache name.opType - Type of operation, e.g. cache hits.public void add(String cacheName, TransactionStats txStats)
CacheStatisticsadd in interface CacheStatisticspublic double hitMissRatio(String cacheName)
CacheStatisticshitMissRatio in interface CacheStatisticscacheName - The cache name.public long numGets(String cacheName)
CacheStatisticsnumGets in interface CacheStatisticscacheName - The cache name.public Map<TransactionStats.OpType,OperationStats> allStats(String cacheName)
CacheStatisticsCacheStatistics.add(String, TransactionStats) for example.allStats in interface CacheStatisticscacheName - The cache name.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionCopyright © 2005–2018 Alfresco Software. All rights reserved.