public void putAll(Map<? extends K, ? extends V> m) {
        synchronized (lock) {
            HashMap<K, V> _map = new HashMap<K, V>(map);
            _map.putAll(m);
            map = _map;
        }
    }