public interface LazyInitializable
A LazyInitializable is an object that can be initialized lazily.
Note: the instance field initialized of subclass should be volatile to avoid JVM instructions re-ordering
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
doInit()do initialization |
|
public boolean |
isInitialized()Check if the object is initialized. |
|
public void |
lazyInit()Initializes this instance once on first access. |
|
public void |
setInitialized(boolean initialized)Mark the object initialized. |
do initialization
Check if the object is initialized.
Initializes this instance once on first access.
Mark the object initialized.
initialized - initialized