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)
CacheStatistics
count
in interface CacheStatistics
cacheName
- Name of the cache.opType
- Type of cache operation.public double meanTime(String cacheName, TransactionStats.OpType opType)
CacheStatistics
meanTime
in interface CacheStatistics
cacheName
- The cache name.opType
- Type of operation, e.g. cache hits.public void add(String cacheName, TransactionStats txStats)
CacheStatistics
add
in interface CacheStatistics
public double hitMissRatio(String cacheName)
CacheStatistics
hitMissRatio
in interface CacheStatistics
cacheName
- The cache name.public long numGets(String cacheName)
CacheStatistics
numGets
in interface CacheStatistics
cacheName
- The cache name.public Map<TransactionStats.OpType,OperationStats> allStats(String cacheName)
CacheStatistics
CacheStatistics.add(String, TransactionStats)
for example.allStats
in interface CacheStatistics
cacheName
- The cache name.public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2005–2017 Alfresco Software. All rights reserved.