private static class NamespacedHierarchicalStore.MemoizingSupplier
extends java.lang.Object
implements java.util.function.Supplier<java.lang.Object>
Supplier that memoizes the result of calling its
delegate and ensures it is called at most once.
If the delegate throws an exception, it is stored and rethrown every
time get() is called.
NamespacedHierarchicalStore.StoredValue| Modifier and Type | Class and Description |
|---|---|
private static class |
NamespacedHierarchicalStore.MemoizingSupplier.Failure |
| Modifier and Type | Field and Description |
|---|---|
private java.util.function.Supplier<java.lang.Object> |
delegate |
private static java.lang.Object |
NO_VALUE_SET |
private java.lang.Object |
value |
| Modifier | Constructor and Description |
|---|---|
private |
MemoizingSupplier(java.util.function.Supplier<java.lang.Object> delegate) |
| Modifier and Type | Method and Description |
|---|---|
private void |
computeValue() |
java.lang.Object |
get() |
private static final java.lang.Object NO_VALUE_SET
private final java.util.function.Supplier<java.lang.Object> delegate
private volatile java.lang.Object value