storeSaver.performModificationDone();
}
}
}
final IHeapDataManager dataManager = storeSaver.getDataManager();
if (LOGGER.isInfoEnabled()) {
final int numberOfDataRecord = dataManager
.getNumberOfDataRecord();
LOGGER.info("total number of data record " + numberOfDataRecord
+ ", " + toPreserveSet.size() + " to preserve");
}
final Iterator<DataRecordIdentifier> iterator = dataManager
.dataRecordIterator();
garbageStartNotify();
while (iterator.hasNext()) {
final DataRecordIdentifier existing = iterator.next();
garbageManager.removeFromCandidateAndOrFromToGarbage(existing);
if (!toPreserveSet.contains(existing)) {
if (linkRecordManager == null) {
dataManager.deleteDataRecord(existing);
} else {
linkRecordManager
.removeLinkIfExist(existing/* referenced */);
final ObjectLinkTreeNode objectLinkTreeNode = objectIOManager
.getObjectLinkTreeNode(existing);
dataManager.deleteDataRecord(existing);
final DataRecordIdentifier[] referencedList = objectLinkTreeNode
.getReferencedList();
for (DataRecordIdentifier referenced : referencedList) {
removeLink(existing/* referencing */, referenced);
}