Source:
<code>boolean apply(int file, int offset, int size, byte[] serializedKey, byte[] serializedMetadata, byte[] serializedValue, long seqId, long expiration) throws Exception; } private void forEachOnDisk(boolean readMetadata, boolean readValues, EntryFunctor functor, IntConsumer fileFunctor) throws PersistenceException { <START> if (!started) { <END> return; } try (CloseableIterator<Integer> iterator = fileProvider.getFileIterator()) { while (iterator.hasNext()) { int file = iterator.next(); log.debugf("Loading entries from file %d", file); FileProvider.Handle handle = fileProvider.getFile(file); if (handle == null) { log.debugf("File %d was deleted during iteration", file); fileFunctor.accept(file); continue; } try { int offset = 0; for (;;) { EntryHeader header = EntryRecord.readEntryHeader(handle, offset); if (header == null) { break; } try { byte[] serializedKey = EntryRecord.readKey(handle, header, offset); if (serializedKey == null) { break; } byte[] serializedMetadata = null; if (readMetadata && header.metadataLength() > 0) { serializedMetadata = EntryRecord.readMetadata(handle, header, offset); } byte[] serializedValue = null; int offsetOrNegation = offset; if (header.valueLength() > 0) { if (header.expiryTime() >= 0 && header.expiryTime() <= timeService.wallClockTime()) { offsetOrNegation = ~offset; } else if (readValues) { serializedValue = EntryRecord.readValue(handle, header, offset); } } else { offsetOrNegation = ~offset; } if (!functor.apply(file, offsetOrNegation, header.totalLength(), serializedKey, serializedMetadata, serializedValue, header.seqId(), header.expiryTime())) { return; } } finally { offset += header.totalLength(); } } } finally { handle.close(); fileFunctor.accept(file); } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new PersistenceException(e); } }</code><technical_language>I a feeling this saved nulls out values</technical_language>

Target:
boolean apply(int file, int offset, int size, byte[] serializedKey, byte[] serializedMetadata, byte[] serializedValue, long seqId, long expiration) throws Exception; } private void forEachOnDisk(boolean readMetadata, boolean readValues, EntryFunctor functor, IntConsumer fileFunctor) throws PersistenceException { try (CloseableIterator<Integer> iterator = fileProvider.getFileIterator()) { while (iterator.hasNext()) { int file = iterator.next(); log.debugf("Loading entries from file %d", file); FileProvider.Handle handle = fileProvider.getFile(file); if (handle == null) { log.debugf("File %d was deleted during iteration", file); fileFunctor.accept(file); continue; } try { int offset = 0; for (;;) { EntryHeader header = EntryRecord.readEntryHeader(handle, offset); if (header == null) { break; } try { byte[] serializedKey = EntryRecord.readKey(handle, header, offset); if (serializedKey == null) { break; } byte[] serializedMetadata = null; if (readMetadata && header.metadataLength() > 0) { serializedMetadata = EntryRecord.readMetadata(handle, header, offset); } byte[] serializedValue = null; int offsetOrNegation = offset; if (header.valueLength() > 0) { if (header.expiryTime() >= 0 && header.expiryTime() <= timeService.wallClockTime()) { offsetOrNegation = ~offset; } else if (readValues) { serializedValue = EntryRecord.readValue(handle, header, offset); } } else { offsetOrNegation = ~offset; } if (!functor.apply(file, offsetOrNegation, header.totalLength(), serializedKey, serializedMetadata, serializedValue, header.seqId(), header.expiryTime())) { return; } } finally { offset += header.totalLength(); } } } finally { handle.close(); fileFunctor.accept(file); } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new PersistenceException(e); } }