@Override protected final void lruEntryDestroy(RegionEntry re) { final LRUEntry e = (LRUEntry)re; if (logger.isTraceEnabled(LogMarker.LRU)) { logger.trace(LogMarker.LRU, "lruEntryDestroy for key={}; list size is: {}; actual size is: {}; map size is: {}; entry size: {}; in lru clock: {}", re.getKey(), getTotalEntrySize(), this._getLruList().getExpensiveListCount(), size(), e.getEntrySize(), !e.testEvicted()); } // if (this.lruCreatedKey == re.getKey()) { // String method = Thread.currentThread().getStackTrace()[5].getMethodName(); // } // boolean wasEvicted = e.testEvicted(); /*boolean removed = */_getLruList().unlinkEntry(e); // if (removed || wasEvicted) { // evicted entries have already been removed from the list changeTotalEntrySize(-1 * e.getEntrySize());// subtract the size. Token vTok = re.getValueAsToken(); if (vTok == Token.DESTROYED || vTok == Token.TOMBSTONE) { // OFFHEAP noop TODO: use re.isDestroyedOrTombstone // if in token mode we need to recalculate the size of the entry since it's // staying in the map and may be resurrected e.updateEntrySize(_getCCHelper()); } // } else if (debug) { // debugLogging("entry not removed from LRU list"); // } } /** Called by DiskEntry.Helper.faultInValue
@Override protected final void lruEntryCreate(RegionEntry re) { LRUEntry e = (LRUEntry)re; // Assert.assertFalse(e._getValue() instanceof DiskEntry.RecoveredEntry) if (logger.isTraceEnabled(LogMarker.LRU)) { logger.trace(LogMarker.LRU, "lruEntryCreate for key={}; list size is: {}; actual size is: {}; map size is: {}; entry size: {}; in lru clock: {}", re.getKey(), getTotalEntrySize(), this._getLruList().getExpensiveListCount(), size(), e.getEntrySize(), !e.testEvicted()); } // this.lruCreatedKey = re.getKey(); // [ bruce ] for DEBUGGING only e.unsetEvicted(); NewLRUClockHand lruList = _getLruList(); DiskRegion disk = _getOwner().getDiskRegion(); boolean possibleClear = disk != null && disk.didClearCountChange(); if(!possibleClear || this._getOwner().basicGetEntry(re.getKey()) == re ) { lruList.appendEntry(e); lruEntryUpdate(e); } }
logger.trace(LogMarker.LRU, "lruUpdateCallback; list size is: {}; actual size is: {}; map size is: {}; delta is: {}; limit is: {}; tombstone count={}", getTotalEntrySize(), this._getLruList().getExpensiveListCount(), size(), delta, getLimit(), _getOwner().getTombstoneCount());
debugLogging( "lruEntryDestroy for key=" + re.getKeyCopy() + "; list size is: " + getTotalEntrySize() + "; actual size is: " + this._getLruList().getExpensiveListCount() + "; map size is: " + sizeInVM() + "; entry size: " + e.getEntrySize()
@Override protected final void lruEntryCreate(RegionEntry re) { LRUEntry e = (LRUEntry)re; // Assert.assertFalse(e._getValue() instanceof DiskEntry.RecoveredEntry) if ( debug ) { debugLogging( "lruEntryCreate for key=" + re.getKeyCopy() + "; list size is: " + getTotalEntrySize() + "; actual size is: " + this._getLruList().getExpensiveListCount() + "; map size is: " + sizeInVM() + "; entry size: " + e.getEntrySize() + "; in lru clock: " + !e.testEvicted()); } // this.lruCreatedKey = re.getKey(); // [ bruce ] for DEBUGGING only e.unsetEvicted(); NewLRUClockHand lruList = _getLruList(); DiskRegion disk = _getOwner().getDiskRegion(); boolean possibleClear = disk != null && disk.didClearCountChange(); if(!possibleClear || this._getOwner().basicGetEntry(re.getKey()) == re ) { lruList.appendEntry(e); lruEntryUpdate(e); } }
debugLogging("lruUpdateCallback" + "; list size is: " + getTotalEntrySize() + "; actual size is: " + lruList.getExpensiveListCount() + "; map size is: " + sizeInVM() + "; delta is: " + delta + "; limit is: " + getLimit()