Here\'s the deal. I have a hash map containing data I call \"program codes\", it lives in an object, like so:
Class Metadata
{
private HashMap validProgramC
I think your assumptions are correct. The only thing I would do is set the validProgramCodes volatile.
private volatile HashMap validProgramCodes;
This way, when you update the "pointer" of validProgramCodes you guaranty that all threads access the same latest HasMap "pointer" because they don't rely on local thread cache and go directly to memory.