Package br.com.caelum.vraptor.dash.hibernate.stats

Examples of br.com.caelum.vraptor.dash.hibernate.stats.EntityCacheStatsWrapper


    String[] entityNames = statistics.getEntityNames();
    Map<String, EntityCacheStatsWrapper> entityCacheStats = new HashMap<String, EntityCacheStatsWrapper>();

    for (String entityName : entityNames) {
      EntityStatistics entityStatistics = statistics.getEntityStatistics(entityName);
      EntityCacheStatsWrapper entityCacheStatsWrapper = new EntityCacheStatsWrapper();
      entityCacheStatsWrapper.setEntityStatsWrapper(new EntityStatsWrapper(entityName, entityStatistics));
      entityCacheStats.put(entityName, entityCacheStatsWrapper);
    }

    for (String regionName : statistics.getSecondLevelCacheRegionNames()) {
      CacheStatsWrapper cacheStatsWrapper = new CacheStatsWrapper(regionName, statistics.getSecondLevelCacheStatistics(regionName));
      if(entityCacheStats.containsKey(regionName)){
        EntityCacheStatsWrapper entityCacheStatsWrapper = entityCacheStats.get(regionName);
        EntityCacheStatsWrapper entityStatsWrapper = entityCacheStatsWrapper;
        entityStatsWrapper.setCacheStatsWrapper(cacheStatsWrapper);
      }
      else {
        EntityCacheStatsWrapper entityCacheStatsWrapper = new EntityCacheStatsWrapper();
        entityCacheStatsWrapper.setCacheStatsWrapper(cacheStatsWrapper);
        entityCacheStats.put(regionName, entityCacheStatsWrapper);
      }
    }

    result.include("entityCacheStats", entityCacheStats);
View Full Code Here


    String[] entityNames = statistics.getEntityNames();
    Map<String, EntityCacheStatsWrapper> entityCacheStats = new HashMap<String, EntityCacheStatsWrapper>();

    for (String entityName : entityNames) {
      EntityStatistics entityStatistics = statistics.getEntityStatistics(entityName);
      EntityCacheStatsWrapper entityCacheStatsWrapper = new EntityCacheStatsWrapper();
      entityCacheStatsWrapper.setEntityStatsWrapper(new EntityStatsWrapper(entityName, entityStatistics));
      entityCacheStats.put(entityName, entityCacheStatsWrapper);
    }

    for (String regionName : statistics.getSecondLevelCacheRegionNames()) {
      CacheStatsWrapper cacheStatsWrapper = new CacheStatsWrapper(regionName, statistics.getSecondLevelCacheStatistics(regionName));
      if(entityCacheStats.containsKey(regionName)){
        EntityCacheStatsWrapper entityCacheStatsWrapper = entityCacheStats.get(regionName);
        EntityCacheStatsWrapper entityStatsWrapper = entityCacheStatsWrapper;
        entityStatsWrapper.setCacheStatsWrapper(cacheStatsWrapper);
      }
      else {
        EntityCacheStatsWrapper entityCacheStatsWrapper = new EntityCacheStatsWrapper();
        entityCacheStatsWrapper.setCacheStatsWrapper(cacheStatsWrapper);
        entityCacheStats.put(regionName, entityCacheStatsWrapper);
      }
    }

    result.include("entityCacheStats", entityCacheStats);
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.dash.hibernate.stats.EntityCacheStatsWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.