/** * 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; }