|
Transfer version 1.1 | ||||
| FRAMES | |||||
WEB-INF.cftags.component
transfer.com.cache.CacheMonitor
public class CacheMonitor
The cache monitor class for introspection and statistics on caching
| Constructor Summary | |
|---|---|
init(FacadeFactory facadeFactory, CacheConfigManager cacheConfigManager)
Constructor |
|
| Method Summary | |
|---|---|
private void |
eachCacheManager(any function, [struct args='[runtime expression]'])
HOF that runs a function against each facade's ConfigManager, if it has one |
package void |
evict(string className)
adds ane extra counter to the cache eviction count |
private void |
executeGetCachedClasses(any cacheManager, array classArray)
adds the keyset from the cached classes to the array in the arguments |
private CacheConfigManager |
getCacheConfigManager()
|
struct |
getCacheSettings(string className)
gets the cache settings for a class, as a struct |
array |
getCachedClasses()
returns all the cached classes |
numeric |
getCalculatedSize(string className)
A slow look at how many items are in cache, where a copy of the cache is taken, and inspected item by item. |
numeric |
getEstimatedSize(string className)
A fast lookup of how many items in the cache, simply by checking its size, which may not be exactly accurate |
private struct |
getEvictMap()
|
numeric |
getEvictions(string className)
get the total number of cache evictions for this class |
private FacadeFactory |
getFacadeFactory()
|
private struct |
getHitMap()
|
numeric |
getHitMissRatio(string className)
returns the ratio of hits vs misses. Values above 1 mean that more hits are occuring than misses. |
numeric |
getHits(string className)
returns the number of hits for that class |
private numeric |
getMapValue(struct map, string className)
returns a map value, if it exists, otherwise, returns 0 |
private struct |
getMissMap()
|
numeric |
getMisses(string className)
returns the number of misses for that class |
numeric |
getTotalCalculatedSize()
get the calculated size for all classes |
numeric |
getTotalEstimatedSize()
get the estimated size for all classes |
numeric |
getTotalEvictions()
get the total number of cache evictions |
numeric |
getTotalHitMissRatio()
returns the ratio of total hits vs total misses. Values above 1 mean that more hits are occurring more than misses. |
numeric |
getTotalHits()
get the total number of hits |
numeric |
getTotalMisses()
get the total number of hits |
private struct |
getValueMap(struct map, string className, string operation)
returns default values for a value map |
package void |
hit(string className)
add an extra count to this cache's value being found successfully |
private void |
invokeFacadeCacheManager(AbstractBaseFacade facade, any function, struct args)
invokes the function against the cache manager if the facade has one |
package void |
miss(string className)
add an extra count to this cache's value not being found |
void |
resetEvictions()
resets eviction counters back to 0 |
void |
resetHitsAndMisses()
resets the Hit and MIss counters back to 0 |
private void |
setCacheConfigManager(CacheConfigManager CacheConfigManager)
|
private void |
setEvictMap(struct evictMap)
|
private void |
setFacadeFactory(FacadeFactory FacadeFactory)
|
private void |
setHitMap(struct HitMap)
|
private void |
setMissMap(struct MissMap)
|
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Constructor Detail |
|---|
public init(FacadeFactory facadeFactory, CacheConfigManager cacheConfigManager)
facadeFactory - The facade factory to access cachescacheConfigManager - The cache config manager| Method Detail |
|---|
private void eachCacheManager(any function, [struct args='[runtime expression]'])
function - the function to call on the CacheManagerargs - the argument data to pass from function call to function callpackage void evict(string className)
className - the className being evictedprivate void executeGetCachedClasses(any cacheManager, array classArray)
cacheManager - the java cache managerclassArray - the array of classesprivate CacheConfigManager getCacheConfigManager()
public struct getCacheSettings(string className)
className - the name of the classpublic array getCachedClasses()
public numeric getCalculatedSize(string className)
className - the name of the classpublic numeric getEstimatedSize(string className)
className - the name of the classprivate struct getEvictMap()
public numeric getEvictions(string className)
className - the class to retrive hits forprivate FacadeFactory getFacadeFactory()
private struct getHitMap()
public numeric getHitMissRatio(string className)
className - the name of the class to get the ratio forpublic numeric getHits(string className)
className - the class to retrive hits forprivate numeric getMapValue(struct map, string className)
map - the map to search forclassName - the className being retrievedprivate struct getMissMap()
public numeric getMisses(string className)
className - the class to retrive hits forpublic numeric getTotalCalculatedSize()
public numeric getTotalEstimatedSize()
public numeric getTotalEvictions()
public numeric getTotalHitMissRatio()
public numeric getTotalHits()
public numeric getTotalMisses()
private struct getValueMap(struct map, string className, string operation)
map - the structure being returnedclassName - the className being retrievedoperation - the name of the operationpackage void hit(string className)
className - the className being hitprivate void invokeFacadeCacheManager(AbstractBaseFacade facade, any function, struct args)
facade - the facade to call againstfunction - the function to call on the CacheManagerargs - the argument data to pass from function call to function callpackage void miss(string className)
className - the className being missedpublic void resetEvictions()
public void resetHitsAndMisses()
private void setCacheConfigManager(CacheConfigManager CacheConfigManager)
CacheConfigManagerprivate void setEvictMap(struct evictMap)
evictMapprivate void setFacadeFactory(FacadeFactory FacadeFactory)
FacadeFactoryprivate void setHitMap(struct HitMap)
HitMapprivate void setMissMap(struct MissMap)
MissMap
|
Transfer version 1.1 | ||||
| FRAMES | |||||