That's a problem of the API itself, IMO - it requests all entries in single region, but it does not make sense to expose the internal key implementation, and if there are entities with different IDs, what could you do? If we want to have correct values in the map (at least), we could use plain new Object() as keys, breaking the key = id part for all cases. I suggest to deprecate this method and document it's deficiencies (it does not have any javadoc anyway). Enumerating all entries should not be a job of "statistics", and if someone really needs such functionality, there could be a method returning Iterable} or {{Stream. |