@ Override synchronized public V put ( K key , V value ) { V oldValue = this . get ( key ) ; try { super . put ( key , value ) ; writeBack ( key , value ) ; return oldValue ; } catch ( Exception e ) { super . put ( key , oldValue ) ; writeBack ( key , oldValue ) ; throw new VoldemortException ( "Failed to put(" + key + ", " + value + ") in write through cache" , e ) ; } }
Updates the value in HashMap and writeBack as Atomic step