/** regions track the number of tombstones their map holds for size calculations */ public void incTombstoneCount(int delta) { this.tombstoneCount.addAndGet(delta); this.cachePerfStats.incTombstoneCount(delta); //Fix for 45204 - don't include the tombstones in //any of our entry count stats. this.cachePerfStats.incEntryCount(-delta); if(getDiskRegion() != null) { getDiskRegion().incNumEntriesInVM(-delta); } DiskEntry.Helper.incrementBucketStats(this, -delta/*InVM*/, 0/*OnDisk*/, 0); }
/** regions track the number of tombstones their map holds for size calculations */ public void incTombstoneCount(int delta) { // LogWriterI18n log = this.cache.getLoggerI18n(); // log.info(LocalizedStrings.DEBUG, "incTombstoneCount invoked with " + delta, new Exception("Stack Trace")); this.tombstoneCount.addAndGet(delta); this.cachePerfStats.incTombstoneCount(delta); //Fix for 45204 - don't include the tombstones in //any of our entry count stats. this.cachePerfStats.incEntryCount(-delta); if(getDiskRegion() != null) { getDiskRegion().incNumEntriesInVM(-delta); } DiskEntry.Helper.incrementBucketStats(this, -delta/*InVM*/, 0/*OnDisk*/, 0); }
void statsClear(LocalRegion region) { if (region instanceof BucketRegion) { BucketRegion owner=(BucketRegion)region; long curInVM = owner.getNumEntriesInVM()*-1; long curOnDisk = owner.getNumOverflowOnDisk()*-1; long curBytesOnDisk = owner.getNumOverflowBytesOnDisk()*-1; incNumEntriesInVM(curInVM); incNumOverflowOnDisk(curOnDisk); incNumOverflowBytesOnDisk(curBytesOnDisk); owner.incNumEntriesInVM(curInVM); owner.incNumOverflowOnDisk(curOnDisk); owner.incNumOverflowBytesOnDisk(curBytesOnDisk); } else { // set them both to zero incNumEntriesInVM(getNumEntriesInVM()*-1); incNumOverflowOnDisk(getNumOverflowOnDisk()*-1); incNumOverflowBytesOnDisk(getNumOverflowBytesOnDisk()*-1); } }
void statsClear(LocalRegion region) { if (region instanceof BucketRegion) { BucketRegion owner=(BucketRegion)region; long curInVM = owner.getNumEntriesInVM()*-1; long curOnDisk = owner.getNumOverflowOnDisk()*-1; long curOnDiskBytes = owner.getNumOverflowBytesOnDisk()*-1; incNumEntriesInVM(curInVM); incNumOverflowOnDisk(curOnDisk); incNumOverflowBytesOnDisk(curOnDiskBytes); owner.incNumEntriesInVM(curInVM); owner.incNumOverflowOnDisk(curOnDisk); owner.incNumOverflowBytesOnDisk(curOnDiskBytes); } else { // set them both to zero incNumEntriesInVM(getNumEntriesInVM()*-1); incNumOverflowOnDisk(getNumOverflowOnDisk()*-1); incNumOverflowBytesOnDisk(getNumOverflowBytesOnDisk()*-1); } }
/** * This code needs to be evaluated. It was added quickly to help PR persistence * not to consume as much memory. */ public void evictValue(Object key) { final LocalRegion owner = _getOwner(); RegionEntry re = getEntry(key); if (re != null) { synchronized (re) { if (!re.isValueNull()) { re.setValueToNull(); owner.getDiskRegion().incNumEntriesInVM(-1L); owner.getDiskRegion().incNumOverflowOnDisk(1L); if(owner instanceof BucketRegion) { ((BucketRegion)owner).incNumEntriesInVM(-1L); ((BucketRegion)owner).incNumOverflowOnDisk(1L); } } } } }
/** * This code may not be correct. It was added quickly to help customer's PR persistence to * not consume as much memory. */ public void evictValue(Object key) { final LocalRegion owner = _getOwner(); RegionEntry re = getEntry(key); if (re != null) { synchronized (re) { if (!re.isValueNull()) { re.setValueToNull(owner); owner.getDiskRegion().incNumEntriesInVM(-1L); owner.getDiskRegion().incNumOverflowOnDisk(1L); if(owner instanceof BucketRegion) { ((BucketRegion)owner).incNumEntriesInVM(-1L); ((BucketRegion)owner).incNumOverflowOnDisk(1L); } } } } }
dr.incNumEntriesInVM(-1L); incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, 0); dr.unscheduleAsyncWrite(did); dr.incNumEntriesInVM(-1L); incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, 0); if (!dr.isSync()) {
dr.incNumEntriesInVM(-1L); incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, 0); dr.unscheduleAsyncWrite(did); dr.incNumEntriesInVM(-1L); incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, 0); if (!dr.isSync()) {
incrementBucketStats(region, 0/*InVM*/, -1/*OnDisk*/, -oldValueLength); } else { dr.incNumEntriesInVM(-1L); incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, 0); } else { entry.setValueWithContext(region, entry.prepareValueForCache(region, re.getValue(), false, false)); dr.incNumEntriesInVM(1L); incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0); dr.incNumEntriesInVM(1L); incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0); dr.incNumEntriesInVM(1L); dr.incNumOverflowOnDisk(-1L); incrementBucketStats(region, 1/*InVM*/, -1/*OnDisk*/, -oldValueLength);
incrementBucketStats(region, 0/*InVM*/, -1/*OnDisk*/, -oldValueLength); } else { dr.incNumEntriesInVM(-1L); incrementBucketStats(region, -1/*InVM*/, 0/*OnDisk*/, 0); } else { entry.setValueWithContext(region, entry.prepareValueForCache(region, re.getValue(), false)); dr.incNumEntriesInVM(1L); incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0); dr.incNumEntriesInVM(1L); incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0); dr.incNumEntriesInVM(1L); dr.incNumOverflowOnDisk(-1L); dr.incNumOverflowBytesOnDisk(-oldValueLength);
dr.incNumEntriesInVM(1L); dr.incNumOverflowOnDisk(-1L);
dr.incNumEntriesInVM(1L); dr.incNumOverflowOnDisk(-1L);
valueLength = getValueLength(did); dr.incNumEntriesInVM(-1L); dr.incNumOverflowOnDisk(1L); dr.incNumOverflowBytesOnDisk(valueLength);
change = ((LRUClockNode)entry).updateEntrySize(ccHelper); dr.incNumEntriesInVM(-1L); dr.incNumOverflowOnDisk(1L); int valueLength = 0;