thread safe LinkedHashMap without Collections.synchronized
I am using a LinkedHashMap and the environment is multi threaded so this structure needs to be thread safe. During specific events I need to read the entire map push to db and clear all. Most of time only writes happen to this map. This map has a limit 50 entries. I am using Oracle MAF and it does not have Collections.syncronizedMap available. So, what are things I need to put in synchronized blocks to make sure writing and reading doesn't hit me concurrentModificationException etc Few requirements: I need to behave it like a circular queue so Overriding removeEldestEntry method of the