Source:
public void run(String mapName, Predicate predicate, int partitionId, Result result) { PagingPredicateImpl pagingPredicate = predicate instanceof PagingPredicateImpl ? (PagingPredicateImpl) predicate : null; PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(partitionId); MapContainer mapContainer = mapServiceContext.getMapContainer(mapName); RecordStore<Record> recordStore = partitionContainer.getRecordStore(mapName); boolean nativeMemory = recordStore.getInMemoryFormat() == InMemoryFormat.NATIVE; boolean useCachedValues = isUseCachedDeserializedValuesEnabled(mapContainer, partitionId); Extractors extractors = mapServiceContext.getExtractors(mapName); StoreAdapter storeAdapter = new RecordStoreAdapter(recordStore); Map.Entry<Integer, Map.Entry> nearestAnchorEntry = pagingPredicate == null ? null : pagingPredicate.getNearestAnchorEntry(); recordStore.forEachAfterLoad(new BiConsumer<Data, Record>() { LazyMapEntry queryEntry = new LazyMapEntry(); @Override public void accept(Data key, Record record) { Object value = useCachedValues ? getValueOrCachedValue(record, ss) : record.getValue(); if (value == null) { return; } key = toHeapData(key); value = nativeMemory ? toHeapData((Data) value) : value; queryEntry.init(ss, key, value, extractors); queryEntry.setRecord(record); queryEntry.setStoreAdapter(storeAdapter); queryEntry.setMetadata(PartitionScanRunner.this.getMetadataFromRecord(recordStore, key, record)); if (predicate.apply(queryEntry) && compareAnchor(pagingPredicate, queryEntry, nearestAnchorEntry)) { result.add(queryEntry); queryEntry = new LazyMapEntry(); } } }, false); result.orderAndLimit(pagingPredicate, nearestAnchorEntry); }

Target:
public void run(String mapName, Predicate predicate, int partitionId, Result result) { PagingPredicateImpl pagingPredicate = predicate instanceof PagingPredicateImpl ? (PagingPredicateImpl) predicate : null; PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(partitionId); MapContainer mapContainer = mapServiceContext.getMapContainer(mapName); RecordStore<Record> recordStore = partitionContainer.getRecordStore(mapName); boolean nativeMemory = recordStore.getInMemoryFormat() == InMemoryFormat.NATIVE; boolean useCachedValues = isUseCachedDeserializedValuesEnabled(mapContainer, partitionId); Extractors extractors = mapServiceContext.getExtractors(mapName); StoreAdapter storeAdapter = new RecordStoreAdapter(recordStore); Map.Entry<Integer, Map.Entry> nearestAnchorEntry = pagingPredicate == null ? null : pagingPredicate.getNearestAnchorEntry(); recordStore.forEachAfterLoad(new BiConsumer<Data, Record>() { LazyMapEntry queryEntry = new LazyMapEntry(); @Override public void accept(Data key, Record record) { Object value = useCachedValues ? getValueOrCachedValue(record, ss) : record.getValue(); if (value == null) { return; } queryEntry.init(ss, key, value, extractors); queryEntry.setRecord(record); queryEntry.setStoreAdapter(storeAdapter); queryEntry.setMetadata(PartitionScanRunner.this.getMetadataFromRecord(recordStore, key, record)); if (predicate.apply(queryEntry) && compareAnchor(pagingPredicate, queryEntry, nearestAnchorEntry)) { value = nativeMemory ? toHeapData((Data) value) : value; result.add(queryEntry.init(ss, toHeapData(key), value, extractors)); queryEntry = new LazyMapEntry(); } } }, false); result.orderAndLimit(pagingPredicate, nearestAnchorEntry); }