Package com.yahoo.search.query.profile
Class CopyOnWriteContent
java.lang.Object
com.yahoo.component.provider.FreezableClass
com.yahoo.search.query.profile.CopyOnWriteContent
- All Implemented Interfaces:
com.yahoo.component.provider.Freezable
,Cloneable
public class CopyOnWriteContent
extends com.yahoo.component.provider.FreezableClass
implements Cloneable
A HashMap wrapper which can be cloned without copying the wrapped map.
Copying of the map is deferred until there is a write access to the wrapped map.
This may be frozen, at which point no further modifications are allowed.
Note that until this is cloned, the internal map may be both read and written.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Methods inherited from class com.yahoo.component.provider.FreezableClass
ensureNotFrozen, isFrozen
-
Constructor Details
-
CopyOnWriteContent
public CopyOnWriteContent()Create a WRITABLE, empty instance
-
-
Method Details
-
freeze
public void freeze()- Specified by:
freeze
in interfacecom.yahoo.component.provider.Freezable
- Overrides:
freeze
in classcom.yahoo.component.provider.FreezableClass
-
clone
- Overrides:
clone
in classcom.yahoo.component.provider.FreezableClass
-
unmodifiableMap
-
get
-
put
-
remove
-