1 24 25 package org.objectweb.cjdbc.common.monitor.cache; 26 27 import org.objectweb.cjdbc.common.i18n.Translate; 28 import org.objectweb.cjdbc.controller.cache.result.AbstractResultCache; 29 30 35 public class HitsRatioCollector extends AbstractCacheStatsDataCollector 36 { 37 private static final long serialVersionUID = -1120849056788165259L; 38 39 44 public HitsRatioCollector(String virtualDatabaseName) 45 { 46 super(virtualDatabaseName); 47 } 48 49 52 public long getValue(Object cache) 53 { 54 return ((AbstractResultCache) cache).getCacheStatistics() 55 .getCacheHitRatio(); 56 } 57 58 61 public String getDescription() 62 { 63 return Translate.get("monitoring.cache.hits.ratio"); 64 } 65 } 66 | Popular Tags |