Package org.apache.mina.util
Class LazyInitializer<V>
java.lang.Object
org.apache.mina.util.LazyInitializer<V>
- Type Parameters:
V- The value type
- Direct Known Subclasses:
IoBufferLazyInitializer,LazyInitializedCacheMap.NoopInitializer
An abstract class which provides semantics for an object which will be only
fully initialized when requested to. It allows to avoid loosing time when
early initializing unnecessary objects.
- Since:
- MINA 2.0.0-M2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
The value that results on theinit()call. If null, it means that the value has not been initialized yet.
-
-
Constructor Details
-
LazyInitializer
public LazyInitializer()
-
-
Method Details
-
init
Initializes the value.- Returns:
- the initialized value
-
get
- Returns:
- the value resulting from the initialization.
-