question: public void storeDeviceThrottled ( Device d ) { long intervalNs = syncStoreWriteIntervalMs * 1000L * 1000L ; if ( ! isMaster ) return ; if ( d == null ) return ; long now = System . nanoTime ( ) ; Long last = lastWriteTimes . get ( d . getDeviceKey ( ) ) ; if ( last == null || ( now - last ) > intervalNs ) { writeUpdatedDeviceToStorage ( d ) ; lastWriteTimes . put ( d . getDeviceKey ( ) , now ) ; } else { cntDeviceStoreThrottled . increment ( ) ; } }
target:  Write the given device to storage if we are MASTER and if the last write for the device was more than this.syncStoreIntervalNs time ago. Use this method to updated last active times in the store.