Class LocklessLazyVar<T>
java.lang.Object
manifold.util.concurrent.LocklessLazyVar<T>
Implements the lazy initialization pattern.
No locking of any kind is used.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Tclear()Clears the variable, forcing the next call toget()to re-init the value.get()protected abstract Tinit()booleanisLoaded()static <Q> LocklessLazyVar<Q> make(LocklessLazyVar.LazyVarInit<Q> closure) Creates a new LockingLazyVar based on the type of the LazyVarInit passed in.
-
Field Details
-
NULL
-
-
Constructor Details
-
LocklessLazyVar
public LocklessLazyVar()
-
-
Method Details
-
get
- Returns:
- the value of this lazy var, created if necessary
-
set
-
init
-
clear
-
isLoaded
public boolean isLoaded() -
make
Creates a new LockingLazyVar based on the type of the LazyVarInit passed in.
-