StorageEntityInitializer does not use StorageFileReader
There is a dedicated type "StorageFileReader" that is meant to encapsulate all reading from Storage files. E.g. to add logging aspects or replace it by another reading algorithm. However, it is only used in StorageFileManager#loadData (loading entity data from the files on a cache miss), but not during initialization (StorageEntityInitializer). StorageEntityInitializer has a method #fillBuffer with redundant logic that it uses to initially read the storage data files. This is not wrong, but for the StorageFileReader to "completely" make sense, it should be the one and only way to read data from data files.
This would actually be very quick to be changed.
The method
StorageEntityInitializer#fillBuffer
would simply have to be replaced by a call to a StorageFileReader
which could be passed in
StorageFileManager#initializeForExistingFiles
to the call of
StorageEntityInitializer#registerEntities
and then passed through to
StorageEntityInitializer#indexEntities
It would also have to passe the StorageFileManager itself as the StorageReaderCallback. Or maybe it should be wrapped into a single instance. Or maybe intentionally not ... hm ...