title: thread safe LinkedHashMap without Collections.synchronized
body: <p>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. </p>
  
  <p>Most of time only writes happen to this map. This map has a limit 50 entries.</p>
  
  <p>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</p>
  
  <p>Few requirements:</p>
  
  <ol>
  <li>I need to behave it like a circular queue so Overriding removeEldestEntry method of the LinkedHashMap. </li>
  <li>I need to preserve the order</li>
  </ol>