Package org.iworkz.habitat.sync
Class SynchronizedPropertyAccess<R,T>
java.lang.Object
org.iworkz.habitat.sync.SynchronizedPropertyAccess<R,T>
- Type Parameters:
R-T-
public class SynchronizedPropertyAccess<R,T> extends Object
Convenient support for 'double-checked locking'-pattern for properties of an Object.
-
Field Summary
Fields Modifier and Type Field Description protected Supplier<T>getterInvocationprotected Robjectprotected Consumer<T>setterInvocation -
Constructor Summary
-
Method Summary
-
Field Details
-
object
-
getterInvocation
-
setterInvocation
-
-
Constructor Details
-
SynchronizedPropertyAccess
-
-
Method Details
-
get
-
isDefined
public boolean isDefined() -
getOrCreate
-
getOrCreate
-
createAndSet
-
create
-
create
-