JCSAdminBean admin = new JCSAdminBean(); LinkedList linkedList = admin.buildCacheInfo(); ListIterator iterator = linkedList.listIterator(); while (iterator.hasNext()) { CacheRegionInfo info = (CacheRegionInfo)iterator.next(); CompositeCache compCache = info.getCache(); System.out.println("Cache Name: " + compCache.getCacheName()); System.out.println("Cache Type: " + compCache.getCacheType()); System.out.println("Cache Misses (not found): " + compCache.getMissCountNotFound()); System.out.println("Cache Misses (expired): " + compCache.getMissCountExpired()); System.out.println("Cache Hits (memory): " + compCache.getHitCountRam()); System.out.println("Cache value: " + compCache.get(propId));
/** * This returns data gathered for this region and all the auxiliaries it currently uses. * <p> * @return Statistics and Info on the Region. */ public ICacheStats getStatistics() { ICacheStats stats = new CacheStats(); stats.setRegionName( this.getCacheName() ); // store the composite cache stats first ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); elems.add(new StatElement<Integer>( "HitCountRam", Integer.valueOf(getHitCountRam()) ) ); elems.add(new StatElement<Integer>( "HitCountAux", Integer.valueOf(getHitCountAux()) ) ); stats.setStatElements( elems ); // memory + aux, memory is not considered an auxiliary internally int total = auxCaches.length + 1; ArrayList<IStats> auxStats = new ArrayList<IStats>(total); auxStats.add(getMemoryCache().getStatistics()); for ( AuxiliaryCache<K, V> aux : auxCaches ) { auxStats.add(aux.getStatistics()); } // store the auxiliary stats stats.setAuxiliaryCacheStats( auxStats ); return stats; }
/** * This returns data gathered for this region and all the auxiliaries it currently uses. * <p> * @return Statistics and Info on the Region. */ public ICacheStats getStatistics() { ICacheStats stats = new CacheStats(); stats.setRegionName( this.getCacheName() ); // store the composite cache stats first ArrayList<IStatElement<?>> elems = new ArrayList<IStatElement<?>>(); elems.add(new StatElement<Integer>( "HitCountRam", Integer.valueOf(getHitCountRam()) ) ); elems.add(new StatElement<Integer>( "HitCountAux", Integer.valueOf(getHitCountAux()) ) ); stats.setStatElements( elems ); // memory + aux, memory is not considered an auxiliary internally int total = auxCaches.length + 1; ArrayList<IStats> auxStats = new ArrayList<IStats>(total); auxStats.add(getMemoryCache().getStatistics()); for ( AuxiliaryCache<K, V> aux : auxCaches ) { auxStats.add(aux.getStatistics()); } // store the auxiliary stats stats.setAuxiliaryCacheStats( auxStats ); return stats; }
cache.getStatus().toString(), cache.getStats(), cache.getHitCountRam(), cache.getHitCountAux(), cache.getMissCountNotFound(),
cache.getStatus().toString(), cache.getStats(), cache.getHitCountRam(), cache.getHitCountAux(), cache.getMissCountNotFound(),