String regionNames[] = stats.getSecondLevelCacheRegionNames();
for (String regionName : regionNames) {
SecondLevelCacheStatistics regionStat = stats.getSecondLevelCacheStatistics(regionName);
HibernateStat newstat = new HibernateStat();
newstat.setRegionName(regionName);
newstat.setCachePuts(regionStat.getPutCount());
newstat.setCacheHits(regionStat.getHitCount());
newstat.setCacheMisses(regionStat.getMissCount());
newstat.setMemoryUsed(regionStat.getSizeInMemory());
newstat.setNumObjectsInMemory(regionStat.getElementCountInMemory());
newstat.setNumObjectsOnDisk(regionStat.getElementCountOnDisk());
statsList.add(newstat);
}
return statsList;
}