Package helma.util

Class CopyOnWriteMap

java.lang.Object
helma.util.WrappedMap
helma.util.CopyOnWriteMap
All Implemented Interfaces:
Map

public class CopyOnWriteMap extends WrappedMap
A Map that wraps another map and creates a new copy of the wrapped map if we try to modify it. This class is wrapped as a native scripted object in JavaScript rather than exposing them through Java reflection. All methods in this class are synchronized in order not to miss the switch between original and copied map.