I changed it to make sure that we are using map operations that are exposed by a Scala map, so that it is easier to replace TimeStampedHashMap with a Scala map later (when we have a better sense of how to clean up). In this case, since we are throwing an error if previous values exists, the behavior of put and putifAbsent is similar. Though, I realize now, that putIfAbsent is atomic, where as scala's Map.put it is not obvious whether it is atomic.