This appears to be very similar to __ MapBasedKeyedFileIndexer__ try to extract some commonality