some questions about ThreadSafeMap in a jServer environment:
and last but not least, what is the correct way to obtain a Lock on a ThreadSafeMap for a read/modify/write operation?
- a Map that is loaded once with CreateMap(...) at startup and is used only with Get, does not need to be a ThreadSafeMap, correct?
- a Map created in a ServerHandler Class_Globals, and used only within that class, does not need to be a ThreadSafeMap, correct?
- a Map in a Process_Globals, accessed with Get and Put should be a ThreadSafeMap, correct?
- a Map that should be a ThreadSafeMap, but is erroneously declared as Map, can cause an exception at runtime or just unpredictable results because of eventual concurrent write access?
and last but not least, what is the correct way to obtain a Lock on a ThreadSafeMap for a read/modify/write operation?