Package graphql.util
Class InterThreadMemoizedSupplier<T>
- java.lang.Object
-
- graphql.util.InterThreadMemoizedSupplier<T>
-
- Type Parameters:
T- for two
- All Implemented Interfaces:
java.util.function.Supplier<T>
public class InterThreadMemoizedSupplier<T> extends java.lang.Object implements java.util.function.Supplier<T>This memoizing supplier DOES use locked double locking to set its value.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Supplier<T>delegateprivate booleaninitializedprivate LockKit.ReentrantLocklockprivate Tvalue
-
Constructor Summary
Constructors Constructor Description InterThreadMemoizedSupplier(java.util.function.Supplier<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget()
-
-
-
Field Detail
-
delegate
private final java.util.function.Supplier<T> delegate
-
initialized
private volatile boolean initialized
-
lock
private final LockKit.ReentrantLock lock
-
value
private T value
-
-
Constructor Detail
-
InterThreadMemoizedSupplier
public InterThreadMemoizedSupplier(java.util.function.Supplier<T> delegate)
-
-