@Override public CachePerfStats getRegionPerfStats() { PartitionedRegionDataStore ds = getDataStore(); CachePerfStats result = null; if (ds != null) { // If we don't have a data store (we are an accessor) // then we do not have per region stats. // This is not good. We should still have stats even for accessors. result = ds.getCachePerfStats(); // fixes 46692 } return result; }
@Override public CachePerfStats getRegionPerfStats() { PartitionedRegionDataStore ds = getDataStore(); CachePerfStats result = null; if (ds != null) { // If we don't have a data store (we are an accessor) // then we do not have per region stats. // This is not good. We should still have stats even for accessors. result = ds.getCachePerfStats(); // fixes 46692 } return result; }
private void initialize(PartitionedRegion region) { setNumberOfEntries(region.size()); // If there is a data store (meaning that the PR has storage // in this VM), get the number of entries and heap size. Else, // set these to 0. PartitionedRegionDataStore ds = region.getDataStore(); int numLocalEntries = 0; long heapSize = 0; if (ds != null) { CachePerfStats cpStats = ds.getCachePerfStats(); numLocalEntries = (int) cpStats.getEntries(); heapSize = ds.currentAllocatedMemory(); } setNumberOfLocalEntries(numLocalEntries); setHeapSize(heapSize); }
private void initialize(PartitionedRegion region) { setNumberOfEntries(region.size()); // If there is a data store (meaning that the PR has storage // in this VM), get the number of entries and heap size. Else, // set these to 0. PartitionedRegionDataStore ds = region.getDataStore(); int numLocalEntries = 0; long heapSize = 0; if (ds != null) { CachePerfStats cpStats = ds.getCachePerfStats(); numLocalEntries = (int) cpStats.getEntries(); heapSize = ds.currentAllocatedMemory(); } setNumberOfLocalEntries(numLocalEntries); setHeapSize(heapSize); }