public CacheRegionInfo(String regionName, Map<String, Object> attrs, HibernateStatsMBeanProvider statsBeanProvider) { this.regionName = regionName; this.shortName = CacheRegionUtils.determineShortName(regionName); this.statsBeanProvider = statsBeanProvider; setAttributes(attrs); }
public CacheRegionInfo(String regionName, Map<String, Object> attrs, HibernateStatsMBeanProvider statsBeanProvider) { this.regionName = regionName; this.shortName = CacheRegionUtils.determineShortName(regionName); this.statsBeanProvider = statsBeanProvider; setAttributes(attrs); }
public CacheRegionInfo(String regionName, Map<String, Object> attrs, HibernateStatsMBeanProvider statsBeanProvider) { this.regionName = regionName; this.shortName = CacheRegionUtils.determineShortName(regionName); this.statsBeanProvider = statsBeanProvider; setAttributes(attrs); }
public void handleNotification(Notification notif, Object handBack) { if (tornDown.get()) { return; } String type = notif.getType(); String msg = notif.getMessage(); Object userData = notif.getUserData(); if (EhcacheStats.CACHE_ENABLED.equals(type)) { boolean enabled = (Boolean) userData; Iterator<CacheRegionInfo> iter = regionInfoMap.values().iterator(); while (iter.hasNext()) { iter.next()._setEnabled(enabled); } tableModel.fireTableRowsUpdated(0, tableModel.getRowCount() - 1); detailPanel.updateRegion(); updateSummaryLabel(determineClusteredRegionCount()); } else if (EhcacheStats.CACHE_REGION_CHANGED.equals(type)) { CacheRegionInfo regionInfo = regionInfoMap.get(msg); if (regionInfo != null) { regionInfo.setAttributes((Map<String, Object>) userData); int row = tableModel.getObjectIndex(regionInfo); tableModel.fireTableRowsUpdated(row, row); if (table.isRowSelected(row)) { detailPanel.setCacheRegion(regionInfo); } updateSummaryLabel(determineClusteredRegionCount()); } } }
public void handleNotification(Notification notif, Object handBack) { if (tornDown.get()) { return; } String type = notif.getType(); String msg = notif.getMessage(); Object userData = notif.getUserData(); if (HibernateStatsMBean.CACHE_ENABLED.equals(type)) { boolean enabled = (Boolean) userData; Iterator<CacheRegionInfo> iter = regionInfoMap.values().iterator(); while (iter.hasNext()) { iter.next()._setEnabled(enabled); } tableModel.fireTableRowsUpdated(0, tableModel.getRowCount() - 1); detailPanel.updateRegion(); updateSummaryLabel(determineClusteredRegionCount()); } else if (HibernateStatsMBean.CACHE_REGION_CHANGED.equals(type)) { CacheRegionInfo regionInfo = regionInfoMap.get(msg); if (regionInfo != null) { regionInfo.setAttributes((Map<String, Object>) userData); int row = tableModel.getObjectIndex(regionInfo); tableModel.fireTableRowsUpdated(row, row); if (table.isRowSelected(row)) { detailPanel.setCacheRegion(regionInfo); } updateSummaryLabel(determineClusteredRegionCount()); } } }
public void handleNotification(Notification notif, Object handBack) { if (tornDown.get()) { return; } String type = notif.getType(); String msg = notif.getMessage(); Object userData = notif.getUserData(); if (EhcacheStats.CACHE_ENABLED.equals(type)) { boolean enabled = (Boolean) userData; Iterator<CacheRegionInfo> iter = regionInfoMap.values().iterator(); while (iter.hasNext()) { iter.next()._setEnabled(enabled); } tableModel.fireTableRowsUpdated(0, tableModel.getRowCount() - 1); detailPanel.updateRegion(); updateSummaryLabel(determineClusteredRegionCount()); } else if (EhcacheStats.CACHE_REGION_CHANGED.equals(type)) { CacheRegionInfo regionInfo = regionInfoMap.get(msg); if (regionInfo != null) { regionInfo.setAttributes((Map<String, Object>) userData); int row = tableModel.getObjectIndex(regionInfo); tableModel.fireTableRowsUpdated(row, row); if (table.isRowSelected(row)) { detailPanel.setCacheRegion(regionInfo); } updateSummaryLabel(determineClusteredRegionCount()); } } }