private void updateLru(boolean clearOccured, RegionEntry re, EntryEventImpl event) { if (!clearOccured) { if (event.getOperation().isCreate()) { lruEntryCreate(re); } else { lruEntryUpdate(re); } } }
private void updateLru(boolean clearOccured, RegionEntry re, EntryEventImpl event) { if (!clearOccured) { if (event.getOperation().isCreate()) { lruEntryCreate(re); } else { lruEntryUpdate(re); } } }
public RegionEntry getEntry(Object key, EntryEventImpl event) { RegionEntry re = getEntry(key, event, true); // get from tx should put the entry back in map // it should be evicted once tx completes if (re != null && getTXState(event) != null) { // put the region entry in backing CHM of AbstractRegionMap so that // it can be locked in basicPut/destroy RegionEntry oldRe = backingRM.putEntryIfAbsent(key, re); if (oldRe != null) { if (re.isOffHeap() && !oldRe.equals(re)) { ((OffHeapRegionEntry)re).release(); } return oldRe; } re.setMarkedForEviction(); owner.updateSizeOnCreate(key, owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap)backingRM).incEntryCount(1); ((AbstractRegionMap)backingRM).lruEntryCreate(re); } return re; }
protected RegionEntry getEntry(EntryEventImpl event) { RegionEntry re = getEntry(event.getKey(), event, false); if (re != null && event.isLoadedFromHDFS()) { // put the region entry in backing CHM of AbstractRegionMap so that // it can be locked in basicPut/destroy RegionEntry oldRe = backingRM.putEntryIfAbsent(event.getKey(), re); if (oldRe != null) { if (re instanceof OffHeapRegionEntry && !oldRe.equals(re)) { ((OffHeapRegionEntry) re).release(); } return oldRe; } // since the entry is faulted in from HDFS, it must have // satisfied the eviction criteria in the past, so mark it for eviction re.setMarkedForEviction(); owner.updateSizeOnCreate(event.getKey(), owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap) backingRM).incEntryCount(1); ((AbstractRegionMap) backingRM).lruEntryCreate(re); } return re; }
protected RegionEntry getEntry(EntryEventImpl event) { RegionEntry re = getEntry(event.getKey(), event, false); if (re != null && event.isLoadedFromHDFS()) { // put the region entry in backing CHM of AbstractRegionMap so that // it can be locked in basicPut/destroy RegionEntry oldRe = backingRM.putEntryIfAbsent(event.getKey(), re); if (oldRe != null) { if (re.isOffHeap() && !oldRe.equals(re)) { ((OffHeapRegionEntry) re).release(); } return oldRe; } // since the entry is faulted in from HDFS, it must have // satisfied the eviction criteria in the past, so mark it for eviction re.setMarkedForEviction(); owner.updateSizeOnCreate(event.getKey(), owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap) backingRM).incEntryCount(1); ((AbstractRegionMap) backingRM).lruEntryCreate(re); } return re; }
owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap)backingRM).incEntryCount(1); ((AbstractRegionMap)backingRM).lruEntryCreate(re);
owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap)backingRM).incEntryCount(1); ((AbstractRegionMap)backingRM).lruEntryCreate(re);
owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap)backingRM).incEntryCount(1); ((AbstractRegionMap)backingRM).lruEntryCreate(re);
owner.calculateRegionEntryValueSize(re)); ((AbstractRegionMap)backingRM).incEntryCount(1); ((AbstractRegionMap)backingRM).lruEntryCreate(re);
lruEntryCreate(oldRe); } else { lruEntryUpdate(oldRe); lruEntryCreate(newRe); incEntryCount(1); lruEntryCreate(re); } else { lruEntryUpdate(re);
lruEntryCreate(newRe); incEntryCount(1);
owner.unscheduleTombstone(oldRe); if (newValue != Token.TOMBSTONE){ lruEntryCreate(oldRe); } else { lruEntryUpdate(oldRe); owner.updateSizeOnCreate(key, owner.calculateRegionEntryValueSize(newRe)); EntryLogger.logInitialImagePut(_getOwnerObject(), key, newValue); lruEntryCreate(newRe);
lruEntryCreate(newRe); incEntryCount(1);
owner.unscheduleTombstone(oldRe, validateCount); if (newValue != Token.TOMBSTONE){ lruEntryCreate(oldRe); } else { lruEntryUpdate(oldRe); owner.updateSizeOnCreate(key, newSize); EntryLogger.logInitialImagePut(_getOwnerObject(), key, newValue); lruEntryCreate(newRe);
lruEntryCreate(oldRe); } else { lruEntryUpdate(oldRe); lruEntryCreate(newRe); incEntryCount(1); lruEntryCreate(re); } else { lruEntryUpdate(re);
lruEntryCreate(re); incEntryCount(1);