@ Override public void resync ( ) { lock . writeLock ( ) . lock ( ) ; try { if ( this . knownObjects == null ) { return ; } List < String > keys = this . knownObjects . listKeys ( ) ; for ( String key : keys ) { syncKeyLocked ( key ) ; } } finally { lock . writeLock ( ) . unlock ( ) ; } }
Re - sync the delta FIFO . First It locks the queue to block any more write operation until it finishes processing all the pending items in the queue .