/** * Caller must have "entry" and "did" synced and "dr" readLocked. * @return the unretained result must be used by the caller before it releases the sync on "entry". */ @Unretained private static Object setValueOnFaultIn(Object value, DiskId did, DiskEntry entry, DiskRegionView dr, DiskRecoveryStore region) { // dr.getOwner().getCache().getLogger().info("DEBUG: faulting in entry with key " + entry.getKey()); int bytesOnDisk = getValueLength(did); // Retained by the prepareValueForCache call for the region entry. // NOTE that we return this value unretained because the retain is owned by the region entry not the caller. @Retained Object preparedValue = entry.prepareValueForCache((RegionEntryContext) region, value, false); region.updateSizeOnFaultIn(entry.getKey(), region.calculateValueSize(preparedValue), bytesOnDisk); //did.setValueSerializedSize(0); // I think the following assertion is true but need to run // a regression with it. Reenable this post 6.5 //Assert.assertTrue(entry._getValue() == null); entry.setValueWithContext((RegionEntryContext) region, preparedValue); dr.incNumEntriesInVM(1L); dr.incNumOverflowOnDisk(-1L); dr.incNumOverflowBytesOnDisk(-bytesOnDisk); incrementBucketStats(region, 1/*InVM*/, -1/*OnDisk*/, -bytesOnDisk); return preparedValue; }
@Retained Object preparedValue = entry.prepareValueForCache((RegionEntryContext) region, value, false, false);
did.setValueLength(newValue.getValueLength()); if (newValue.getRecoveredKeyId() >= 0) { entry.setValueWithContext(context, entry.prepareValueForCache(drv, newValue.getValue(), false, false)); } else {
did.setValueLength(newValue.getValueLength()); if (newValue.getRecoveredKeyId() >= 0) { entry.setValueWithContext(context, entry.prepareValueForCache(drv, newValue.getValue(), false)); } else {
entry.setValueWithContext(drv, entry.prepareValueForCache((RegionEntryContext) r, re.getValue(), false)); drv.incNumEntriesInVM(1L);
entry.setValueWithContext(context, entry.prepareValueForCache(context, re.getValue(), false, false)); drv.incNumEntriesInVM(1L);
did.getValueLength()); } else { entry.setValueWithContext(region, entry.prepareValueForCache(region, re.getValue(), false, false)); dr.incNumEntriesInVM(1L); incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0);
did.getValueLength()); } else { entry.setValueWithContext(region, entry.prepareValueForCache(region, re.getValue(), false)); dr.incNumEntriesInVM(1L); incrementBucketStats(region, 1/*InVM*/, 0/*OnDisk*/, 0);