public void freeze() {
        if (frozen) return;
        frozen = true;

        for (Map.Entry<K,List<V>> entry : map.entrySet())
            entry.setValue(List.copyOf(entry.getValue()));
        this.map = Map.copyOf(this.map);
    }
Irreversibly prevent changes to the content of this.
If this is already frozen, this method does nothing.
vespajlib/src/main/java/com/yahoo/collections/ListMap.java