I am considering using EnumMap
in a concurrent environment. However, the environment is atypical, here's why:
EnumMap
is always full: there are no unmapped keys when the map is exposed to the concurrent environment- Only
put()
andget()
operations will be used (no iterating over, noremove()
, etc.) - It is completely acceptable if a call to
get()
does not reflect a call toput()
immediately or orderly.
From what I could gather, including relevant method source code, this seems to be a safe scenario (unlike if iterations were allowed). Is there anything I might have overlooked?