Package com.yahoo.component.provider
Class FreezableSimpleComponent
- java.lang.Object
-
- com.yahoo.component.AbstractComponent
-
- com.yahoo.component.provider.FreezableSimpleComponent
-
- All Implemented Interfaces:
Component
,Deconstructable
,Freezable
,Comparable<Component>
public class FreezableSimpleComponent extends AbstractComponent implements Freezable
Superclass for simple freezable components- Author:
- bratseth
-
-
Field Summary
-
Fields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FreezableSimpleComponent()
protected
FreezableSimpleComponent(ComponentId id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FreezableSimpleComponent
clone()
Clones this.protected void
ensureNotFrozen()
Throws an IllegalStateException if this is frozenvoid
freeze()
Freezes this component to prevent further changes.boolean
isFrozen()
Returns whether this is currently frozen-
Methods inherited from class com.yahoo.component.AbstractComponent
compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
-
-
-
-
Constructor Detail
-
FreezableSimpleComponent
protected FreezableSimpleComponent(ComponentId id)
-
FreezableSimpleComponent
protected FreezableSimpleComponent()
-
-
Method Detail
-
freeze
public void freeze()
Freezes this component to prevent further changes. Override this to freeze internal data structures and dependent objects. Overrides must call super. Calling freeze on an already frozen registry must have no effect.
-
isFrozen
public final boolean isFrozen()
Returns whether this is currently frozen
-
ensureNotFrozen
protected void ensureNotFrozen()
Throws an IllegalStateException if this is frozen
-
clone
public FreezableSimpleComponent clone()
Clones this. The clone will not be frozen- Overrides:
clone
in classAbstractComponent
-
-