public CacheStatistics getStatistics() throws StatisticsDisabledException { return this.realRegion.getStatistics(); }
public CacheStatistics getStatistics() { return this.region.getStatistics(); }
public CacheStatistics getStatistics() throws StatisticsDisabledException { return this.realRegion.getStatistics(); }
public CacheStatistics getStatistics() { return this.region.getStatistics(); }
public float getHitRatio() { if (isStatisticsEnabled) { return region.getStatistics().getHitRatio(); } return ManagementConstants.NOT_AVAILABLE_FLOAT; }
public float getHitRatio() { if (isStatisticsEnabled) { return region.getStatistics().getHitRatio(); } return ManagementConstants.NOT_AVAILABLE_FLOAT; }
public long getLastAccessedTime() { if (isStatisticsEnabled) { return region.getStatistics().getLastAccessedTime(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getHitCount() { if (isStatisticsEnabled) { return region.getStatistics().getHitCount(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getMissCount() { if (isStatisticsEnabled) { return region.getStatistics().getMissCount(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getLastAccessedTime() { if (isStatisticsEnabled) { return region.getStatistics().getLastAccessedTime(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getHitCount() { if (isStatisticsEnabled) { return region.getStatistics().getHitCount(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getMissCount() { if (isStatisticsEnabled) { return region.getStatistics().getMissCount(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getLastModifiedTime() { if (isStatisticsEnabled) { return region.getStatistics().getLastModifiedTime(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public long getLastModifiedTime() { if (isStatisticsEnabled) { return region.getStatistics().getLastModifiedTime(); } return ManagementConstants.NOT_AVAILABLE_LONG; }
public void run2() throws CacheException { Region region = getRootRegion().getSubregion(name); CacheStatistics stats = region.getStatistics(); // lastAccessed var contains stat from an Entry, which may be // up to 100 ms off from stat in Region because Entry has // less precision //assertEquals(lastAccessed, stats.getLastAccessedTime(), 100); assertEquals(0, stats.getHitCount()); assertEquals(0, stats.getMissCount()); } });
private ApplicationStat getStat(Region r) { String note; try { CacheStatistics stats = r.getStatistics(); long hitCount = stats.getHitCount(); double hitRatio = stats.getHitRatio(); note = String.format("hits=%d, hitRatio=%.2f", Long.valueOf(hitCount), Double.valueOf(hitRatio)); } catch(StatisticsDisabledException e) { note = ""; } return new ApplicationStat(STATS_GROUP_PREFIX + r.getFullPath(), r.size(), note); } }
/** * Returns a <code>RegionStatisticsResponse</code> that will be returned to the * specified recipient. The message will contains a copy of the local manager's * system config. */ public static RegionStatisticsResponse create(DistributionManager dm, InternalDistributedMember recipient, Region r) { RegionStatisticsResponse m = new RegionStatisticsResponse(); m.setRecipient(recipient); m.regionStatistics = new RemoteCacheStatistics(r.getStatistics()); return m; }
/** * Returns a <code>RegionStatisticsResponse</code> that will be returned to the * specified recipient. The message will contains a copy of the local manager's * system config. */ public static RegionStatisticsResponse create(DistributionManager dm, InternalDistributedMember recipient, Region r) { RegionStatisticsResponse m = new RegionStatisticsResponse(); m.setRecipient(recipient); m.regionStatistics = new RemoteCacheStatistics(r.getStatistics()); return m; }
public RemoteRegionSnapshot(Region r) throws CacheException { this.name = r.getName(); RegionAttributes rAttr = r.getAttributes(); this.attributes = new RemoteRegionAttributes(rAttr); if (rAttr.getStatisticsEnabled()) { this.stats = new RemoteCacheStatistics(r.getStatistics()); } else { this.stats = new RemoteCacheStatistics(); } this.attributes = new RemoteRegionAttributes(r.getAttributes()); Set nameSet = r.keys(); this.entryCount = nameSet.size(); Set subRegions = r.subregions(false); this.subregionCount = subRegions.size(); Object attr = r.getUserAttribute(); if (attr != null) { this.userAttribute = attr.getClass().getName() + "\"" + attr.toString() + "\""; } else { this.userAttribute = null; } }
public RemoteRegionSnapshot(Region r) throws CacheException { this.name = r.getName(); RegionAttributes rAttr = r.getAttributes(); this.attributes = new RemoteRegionAttributes(rAttr); if (rAttr.getStatisticsEnabled()) { this.stats = new RemoteCacheStatistics(r.getStatistics()); } else { this.stats = new RemoteCacheStatistics(); } this.attributes = new RemoteRegionAttributes(r.getAttributes()); Set nameSet = r.keys(); this.entryCount = nameSet.size(); Set subRegions = r.subregions(false); this.subregionCount = subRegions.size(); Object attr = r.getUserAttribute(); if (attr != null) { this.userAttribute = attr.getClass().getName() + "\"" + attr.toString() + "\""; } else { this.userAttribute = null; } }